summaryrefslogtreecommitdiffstats
path: root/commands/commandeer.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/commandeer.go')
-rw-r--r--commands/commandeer.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/commands/commandeer.go b/commands/commandeer.go
index 08f959579..7b0c41652 100644
--- a/commands/commandeer.go
+++ b/commands/commandeer.go
@@ -108,9 +108,6 @@ type rootCommand struct {
buildWatch bool
environment string
- // File format to read or write (TOML, YAML, JSON).
- format string
-
// Common build flags.
baseURL string
gc bool
@@ -408,12 +405,6 @@ func (r *rootCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
if err != nil {
return err
}
- switch r.format {
- case "json", "toml", "yaml":
- // OK
- default:
- return fmt.Errorf("unsupported format %q; must be one of json, toml or yaml", r.format)
- }
loggers.PanicOnWarning.Store(r.panicOnWarning)
r.commonConfigs = lazycache.New[int32, *commonConfig](lazycache.Options{MaxEntries: 5})
@@ -485,7 +476,6 @@ Complete documentation is available at https://gohugo.io/.`
// Configure persistent flags
cmd.PersistentFlags().StringVarP(&r.source, "source", "s", "", "filesystem path to read files relative from")
- cmd.PersistentFlags().StringVar(&r.format, "format", "toml", "preferred file format (toml, yaml or json)")
cmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
cmd.PersistentFlags().StringP("destination", "d", "", "filesystem path to write files to")
cmd.PersistentFlags().SetAnnotation("destination", cobra.BashCompSubdirsInDir, []string{})