Centralize CLI flag set setup

This commit is contained in:
2026-06-04 00:45:12 +00:00
parent 982e7e9863
commit 9000e12d47
6 changed files with 17 additions and 15 deletions

View File

@@ -2,7 +2,6 @@ package cli
import (
"context"
"flag"
"fmt"
"io"
"strings"
@@ -30,8 +29,7 @@ func manifestCreateCommand(ctx context.Context, args []string, stdout, stderr io
printManifestCreateHelp(stdout)
return exitOK
}
flags := flag.NewFlagSet("manifest create", flag.ContinueOnError)
flags.SetOutput(stderr)
flags := newFlagSet("manifest create", stderr)
id := flags.String("id", "", "source bundle id")
created := flags.String("created", "", "source created timestamp")
overwrite := flags.Bool("overwrite", false, "replace an existing manifest.json")