code-generator: k8s.io/code-generator/cmd/conversion-gen/args Index | Files

package args

import "k8s.io/code-generator/cmd/conversion-gen/args"

Index

Package Files

args.go

Variables

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.

func NewDefaults Uses

func NewDefaults() (*args.GeneratorArgs, *CustomArgs)

NewDefaults returns default arguments for the generator.

func Validate Uses

func Validate(genericArgs *args.GeneratorArgs) error

Validate checks the given arguments.

type CustomArgs Uses

type CustomArgs struct {
    // 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
}

CustomArgs is used by the gengo framework to pass args specific to this generator.

func (*CustomArgs) AddFlags Uses

func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet)

AddFlags add the generator flags to the flag set.

Package args imports 3 packages (graph) and is imported by 4 packages. Updated 2018-06-12. Refresh now. Tools for package owners.