Documentation ¶
Overview ¶
Package generate provides functions for implementing generators.
Index ¶
- func Args() string
- func Dollar() string
- func GoArch() string
- func GoCmd(arguments []string) *exec.Cmd
- func GoFile() string
- func GoGenerateCmd(arguments []string) *exec.Cmd
- func GoLine() string
- func GoOs() string
- func GoPackage() string
- func GoRoot() string
- func GoRunCmd(pkg string, arguments []string) *exec.Cmd
- func WriteFile(name string, data []byte, perm os.FileMode) error
- func WriteSource(name string, data []byte, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Args ¶
func Args() string
Args returns the command line arguments, starting with the base program name as a string.
func Dollar ¶
func Dollar() string
Dollar returns the value of the $DOLLAR environment variable, or panics if the variable is not present.
func GoArch ¶
func GoArch() string
GoArch returns the value of the $GOARCH environment variable, or panics if the variable is not present.
func GoFile ¶
func GoFile() string
GoFile returns the value of the $GOFILE environment variable, or panics if the variable is not present.
func GoGenerateCmd ¶
GoCmd returns an *exec.Cmd to execute "$GOROOT/bin/go generate" with the given arguments.
func GoLine ¶
func GoLine() string
GoLine returns the value of the $GOLINE environment variable, or panics if the variable is not present.
func GoOs ¶
func GoOs() string
GoOs returns the value of the $GOOS environment variable, or panics if the variable is not present.
func GoPackage ¶
func GoPackage() string
GoPackage returns the value of the $GOPACKAGE environment variable, or panics if the variable is not present.
func GoRoot ¶
func GoRoot() string
GoRoot returns the value of the $GOROOT environment variable, or panics if the variable is not present.
func GoRunCmd ¶
GoCmd returns an *exec.Cmd to execute "$GOROOT/bin/go run" with the given arguments.
Types ¶
This section is empty.