package generators
import "k8s.io/gengo/examples/defaulter-gen/generators"
Index ¶
- func DefaultNameSystem() string
- func NameSystems() namer.NameSystems
- func NewGenDefaulter(sanitizedName, typesPackage, outputPackage string, existingDefaulters, newDefaulters defaulterFuncMap, peerPkgs []string) generator.Generator
- func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages
- func ParseSymbolReference(s, sourcePackage string) (types.Name, bool)
- type CallNodeVisitorFunc
- type CustomArgs
Functions ¶
func DefaultNameSystem ¶
func DefaultNameSystem() string
DefaultNameSystem returns the default name system for ordering the types to be processed by the generators in this package.
func NameSystems ¶
func NameSystems() namer.NameSystems
NameSystems returns the name system used by the generators in this package.
func NewGenDefaulter ¶
func NewGenDefaulter(sanitizedName, typesPackage, outputPackage string, existingDefaulters, newDefaulters defaulterFuncMap, peerPkgs []string) generator.Generator
func Packages ¶
func ParseSymbolReference ¶
ParseSymbolReference looks for strings that match one of the following:
- ref(Ident)
- ref(pkgpath.Ident) If the input string matches either of these, it will return the (optional) pkgpath, the Ident, and true. Otherwise it will return empty strings and false.
Types ¶
type CallNodeVisitorFunc ¶
type CallNodeVisitorFunc func(ancestors []*callNode, node *callNode)
CallNodeVisitorFunc is a function for visiting a call tree. ancestors is the list of all parents of this node to the root of the tree - will be empty at the root.
type CustomArgs ¶
type CustomArgs struct { ExtraPeerDirs []string // Always consider these as last-ditch possibilities for conversions. }
CustomArgs is used tby the go2idl framework to pass args specific to this generator.
Source Files ¶
defaulter.go
- Version
- v0.0.0-20250704022524-ddb642e17a28 (latest)
- Published
- Jul 4, 2025
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 2 days ago –
Tools for package owners.