mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Remove config list --keys flag
This commit is contained in:
parent
3f788efff5
commit
feae59a058
@ -2,7 +2,6 @@ FROM alpine:3
|
|||||||
|
|
||||||
ENV PSU_AUTH_TOKEN="" \
|
ENV PSU_AUTH_TOKEN="" \
|
||||||
PSU_CONFIG="" \
|
PSU_CONFIG="" \
|
||||||
PSU_CONFIG_LIST_KEYS="" \
|
|
||||||
PSU_ENDPOINT_GROUP_LIST_FORMAT="" \
|
PSU_ENDPOINT_GROUP_LIST_FORMAT="" \
|
||||||
PSU_ENDPOINT_LIST_FORMAT="" \
|
PSU_ENDPOINT_LIST_FORMAT="" \
|
||||||
PSU_INSECURE="" \
|
PSU_INSECURE="" \
|
||||||
|
@ -22,20 +22,12 @@ var configListCmd = &cobra.Command{
|
|||||||
})
|
})
|
||||||
|
|
||||||
for _, key := range keys {
|
for _, key := range keys {
|
||||||
if viper.GetBool("config.list.keys") {
|
|
||||||
// List config key
|
|
||||||
fmt.Println(key)
|
|
||||||
} else {
|
|
||||||
// List config key and value
|
// List config key and value
|
||||||
fmt.Printf("%s: %v\n", key, viper.Get(key))
|
fmt.Printf("%s: %v\n", key, viper.Get(key))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
configCmd.AddCommand(configListCmd)
|
configCmd.AddCommand(configListCmd)
|
||||||
|
|
||||||
configListCmd.Flags().Bool("keys", false, "Only list keys.")
|
|
||||||
viper.BindPFlag("config.list.keys", configListCmd.Flags().Lookup("keys"))
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user