cmd: fix persistent flags method call

This commit is contained in:
c9s 2023-06-27 16:32:46 +08:00
parent 37da9dee0e
commit 02fa4d822a
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -51,7 +51,7 @@ var RootCmd = &cobra.Command{
env = "development"
}
logFormatter, err := cmd.PersistentFlags().GetString("log-formatter")
logFormatter, err := cmd.Flags().GetString("log-formatter")
if err != nil {
return err
}