INNER CODE UNIT · Go

func

cli/cli · .github/skills/cli-exercise/tool/internal/preflight/main.go:24

func (value *formats) String() string { return strings.Join(*value, ",") }
func (value *formats) Set(format string) error {
	if format != "gif" && format != "mp4" {
		return fmt.Errorf("format must be gif or mp4")
	}
	*value = append(*value, format)
	return nil
}

func parseOptions(args []string) (cliOptions, error) {
	var result cliOptions
	if len(args) == 0 || args[0] != "check" {
		return result, fmt.Errorf("preflight supports check only; setup is performed by the agent after caller approval")
	}
	flags := flag.NewFlagSet("preflight check", flag.ContinueOnError)
	flags.SetOutput(io.Discard)
	flags.StringVar(&result.output, "output", "", "Save the full report")
	flags.StringVar(&result.selections.ModuleRoot, "module-root", "", "Existing node_modules root")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…