Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Rw represents a file permission of read/write for current user // and no access for user's group and other groups. Rw fs.FileMode = 0o600 // RwRR represents a file permission of read/write for current user // and read-only access for user's group and other groups. RwRR fs.FileMode = 0o644 // RwRwRw represents a file permission of read/write for current user // and read/write too for user's group and other groups. RwRwRw fs.FileMode = 0o666 // RwxRxRxRx represents a file permission of read/write/execute for current user // and read/execute for user's group and other groups. RwxRxRxRx fs.FileMode = 0o755 )
View Source
const ( // GenTemplate is the filename inside embedded fs for _gen files. GenTemplate = "template_gen.go.tmpl" // ImplTemplate is the filename inside embedded fs for _impl file. ImplTemplate = "template_impl.go.tmpl" )
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(options CLIOptions, args []string) error
Run runs the builder generation with input options.
Types ¶
type CLIOptions ¶
type CLIOptions struct { Destdir string File string NoCMD bool NoNotice bool PackageName string Prefix string ReturnCopy bool Structs []string ValidateFunc string }
CLIOptions represents the struct of available options to be given to go-builder-generator.
func (CLIOptions) FileRelPath ¶ added in v1.7.0
func (c CLIOptions) FileRelPath() string
FileRelPath returns the relative path of options File property and options Destdir.
func (CLIOptions) ToArgs ¶ added in v1.7.2
func (c CLIOptions) ToArgs(name string) []string
ToArgs serializes back the input options into its slice of string representation.
func (CLIOptions) ToString ¶ added in v1.6.0
func (c CLIOptions) ToString(name string) string
ToString serializes back the input command into its string format.
Click to show internal directories.
Click to hide internal directories.