Merge pull request #110 from jzelinskie/config-fixes

misc config improvements
This commit is contained in:
Jimmy Zelinskie 2016-03-18 17:27:20 -04:00
commit 2121e76f98
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ var log = capnslog.NewPackageLogger("github.com/coreos/clair/cmd/clair", "main")
func main() { func main() {
// Parse command-line arguments // Parse command-line arguments
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError) flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
flagConfigPath := flag.String("config", "", "Load configuration from the specified file.") flagConfigPath := flag.String("config", "/etc/clair/config.yaml", "Load configuration from the specified file.")
flagCPUProfilePath := flag.String("cpu-profile", "", "Write a CPU profile to the specified file before exiting.") flagCPUProfilePath := flag.String("cpu-profile", "", "Write a CPU profile to the specified file before exiting.")
flagLogLevel := flag.String("log-level", "info", "Define the logging level.") flagLogLevel := flag.String("log-level", "info", "Define the logging level.")
flag.Parse() flag.Parse()

View File

@ -92,7 +92,7 @@ func Load(path string) (config *Config, err error) {
var cfgFile File var cfgFile File
cfgFile.Clair = DefaultConfig() cfgFile.Clair = DefaultConfig()
if path == "" { if path == "" {
return return &cfgFile.Clair, nil
} }
f, err := os.Open(os.ExpandEnv(path)) f, err := os.Open(os.ExpandEnv(path))