args

package
v0.0.0-...-8948a66 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	OutputDir  string // must be a directory path
	OutputPkg  string // must be a Go import-path
	OutputFile string

	GoHeaderFile string

	// ReportFilename is added to Args for specifying name of report file used
	// by API linter. If specified, API rule violations will be printed to report file.
	// Otherwise default value "-" will be used which indicates stdout.
	ReportFilename string
}

func New

func New() *Args

New returns default arguments for the generator. Returning the arguments instead of using default flag parsing allows registering custom arguments afterwards

func (*Args) AddFlags

func (args *Args) AddFlags(fs *pflag.FlagSet)

AddFlags add the generator flags to the flag set.

func (*Args) Validate

func (args *Args) Validate() error

Validate checks the given arguments.

Jump to

Keyboard shortcuts

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