INNER CODE UNIT · Go

func

pingcap/tidb-operator · cmd/overlay-gen/main.go:72

func (args *Args) AddFlags(fs *pflag.FlagSet) {
	fs.StringVar(&args.outputFile, "output-file", "zz_generated.overlay",
		"the name of the file to be generated (without extensions)")
	fs.StringVar(&args.outputDir, "output-dir", "",
		"the output dir, default is dir of input")
	fs.StringVar(&args.goHeaderFile, "go-header-file", "",
		"the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year")
}

// Validate checks the arguments.
func (args *Args) Validate() error {
	if args.goHeaderFile == "" {
		return fmt.Errorf("--go-header-file must be specified")
	}

	return nil
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…