INNER CODE UNIT · Go
main
secureCodeBox/secureCodeBox · auto-discovery/cloud-aws/cmd/service/main.go:19
func main() {
var configFile string
flag.StringVar(&configFile, "config", "",
"The service will load its initial configuration from this file. "+
"Omit this flag to use the default configuration values. "+
"Environment variables override some configuration values from this file.")
opts := zap.Options{
Development: false,
}
opts.BindFlags(flag.CommandLine)
flag.Parse()
log := zap.New(zap.UseFlagOptions(&opts))
ctrl.SetLogger(log)
klog.SetLogger(log)
// Read config from file first, some values may be overridden by env variables
cfg := config.GetConfig(configFile)