flags

package
v0.0.0-...-33eec69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package flags contains cobra CLI stuff

Index

Constants

This section is empty.

Variables

View Source
var Generate = func() *cobra.Command {
	enumName := must(newRegexp("^.+Enum$"))

	cmd := &cobra.Command{
		Use:                   "generate package [package...]",
		DisableFlagsInUseLine: true,
		Short:                 "read sources and generate the code",
		Run:                   func(cmd *cobra.Command, args []string) { generateRun(cmd, args, enumName) },
		Args:                  cobra.MinimumNArgs(1),
	}

	cmd.Flags().StringArray(buildTagsFlag, nil, "build tags to be used for sources parsing")
	cmd.Flags().StringArray(envVarsFlag, nil, "environment variables to be used for sources parsing")
	cmd.Flags().Bool(excludeTestsFlag, false, "do not process test files")
	cmd.Flags().Var(enumName, enumNameFlag, "regexp to find the Name type(s)")

	return cmd
}()

Generate is a generate CLI command.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL