args

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 85

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBasePeerDirs = []string{
	"k8s.io/apimachinery/pkg/apis/meta/v1",
	"k8s.io/apimachinery/pkg/conversion",
	"k8s.io/apimachinery/pkg/runtime",
}

DefaultBasePeerDirs are the peer-dirs nearly everybody will use, i.e. those coming from apimachinery.

Functions

This section is empty.

Types

type Args added in v0.30.0

type Args struct {
	// The filename of the generated results.
	OutputFile string

	// Base peer dirs which nearly everybody will use, i.e. outside of Kubernetes core. Peer dirs
	// are declared to make the generator pick up manually written conversion funcs from external
	// packages.
	BasePeerDirs []string

	// Custom peer dirs which are application specific. Peer dirs are declared to make the
	// generator pick up manually written conversion funcs from external packages.
	ExtraPeerDirs []string

	// SkipUnsafe indicates whether to generate unsafe conversions to improve the efficiency
	// of these operations. The unsafe operation is a direct pointer assignment via unsafe
	// (within the allowed uses of unsafe) and is equivalent to a proposed Golang change to
	// allow structs that are identical to be assigned to each other.
	SkipUnsafe bool

	// GoHeaderFile is the path to a boilerplate header file for generated
	// code.
	GoHeaderFile string

	// GeneratedBuildTag is the tag used to identify code generated by execution
	// of this type. Each generator should use a different tag, and different
	// groups of generators (external API that depends on Kube generations) should
	// keep tags distinct as well.
	GeneratedBuildTag string
}

func New added in v0.30.0

func New() *Args

New returns default arguments for the generator.

func (*Args) AddFlags added in v0.30.0

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

AddFlags add the generator flags to the flag set.

func (*Args) Validate added in v0.30.0

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