warehouse/config/flag.go

14 lines
309 B
Go
Raw Normal View History

2024-11-13 21:16:22 +01:00
package config
import (
"flag"
)
func (c *Config) ReadFlags() {
flag.StringVar(&c.ConfigPath, "config", c.ConfigPath, "path of the toml configuration file")
flag.StringVar(&c.BaseUrl, "base-ulr", c.BaseUrl, "base url of the api")
flag.IntVar(&c.Port, "port", c.Port, "port of the api")
flag.Parse()
}