chore(tools/confix/cmd): fix typo in view.go (#18659)

This commit is contained in:
axie 2023-12-08 18:28:16 +08:00 committed by GitHub
parent ba3448a440
commit ae724e1cbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ import (
)
func ViewCommand() *cobra.Command {
flagOutputFomat := "output-format"
flagOutputFormat := "output-format"
cmd := &cobra.Command{
Use: "view [config]",
@ -31,7 +31,7 @@ func ViewCommand() *cobra.Command {
return err
}
if format, _ := cmd.Flags().GetString(flagOutputFomat); format == "toml" {
if format, _ := cmd.Flags().GetString(flagOutputFormat); format == "toml" {
cmd.Println(string(file))
return nil
}
@ -48,7 +48,7 @@ func ViewCommand() *cobra.Command {
}
// output flag
cmd.Flags().String(flagOutputFomat, "toml", "Output format (json|toml)")
cmd.Flags().String(flagOutputFormat, "toml", "Output format (json|toml)")
return cmd
}