Commit dcd4c8d0 authored by Heiko Reese's avatar Heiko Reese
Browse files

cleanups

parent 88f27a38
Pipeline #104811 passed with stage
in 19 seconds
...@@ -110,8 +110,6 @@ func init() { ...@@ -110,8 +110,6 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&cmdArguments.CAName, "ca", "C", "", "Certification Authority identifier") rootCmd.PersistentFlags().StringVarP(&cmdArguments.CAName, "ca", "C", "", "Certification Authority identifier")
rootCmd.PersistentFlags().IntVarP(&cmdArguments.RAId, "ra-id", "R", 0, "Sub-RA identifier (usually 0 for main RA)") rootCmd.PersistentFlags().IntVarP(&cmdArguments.RAId, "ra-id", "R", 0, "Sub-RA identifier (usually 0 for main RA)")
//viper.BindPFlag("ca", rootCmd.PersistentFlags().Lookup("ca"))
//viper.BindPFlag("raid", rootCmd.PersistentFlags().Lookup("ra-id"))
viper.BindPFlags(rootCmd.PersistentFlags()) viper.BindPFlags(rootCmd.PersistentFlags())
} }
...@@ -135,7 +133,8 @@ func initConfig() { ...@@ -135,7 +133,8 @@ func initConfig() {
// If a config file is found, read it in. // If a config file is found, read it in.
err := viper.ReadInConfig() err := viper.ReadInConfig()
if err == nil { if err != nil {
log.Println("Using config file:", viper.ConfigFileUsed()) //log.Println("Using config file:", viper.ConfigFileUsed())
log.Println("Error reading config file: ", err)
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment