Documentation ¶
Index ¶
- func Exists(path string) bool
- func FormatCode(code []byte) ([]byte, error)
- func GetGOPATH() string
- func LowerFirst(s string) string
- func NotPtr(s string) string
- func SearchGoMod(cwd string) (moduleName, path string, found bool)
- func UpperFirst(s string) string
- func WriteToFile(filename string, data []byte)
- type StringSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGOPATH ¶
func GetGOPATH() string
GetGOPATH retrieves the GOPATH from environment variables or the `go env` command.
func LowerFirst ¶
LowerFirst converts the first letter to upper case for the given string.
func SearchGoMod ¶
SearchGoMod searches go.mod from the given directory (which must be an absolute path) to the root directory. When the go.mod is found, its module name and path will be returned.
func UpperFirst ¶
UpperFirst converts the first letter to upper case for the given string.
func WriteToFile ¶
WriteToFile writes data into target file.
Types ¶
type StringSlice ¶
type StringSlice []string
StringSlice implements the flag.Value interface on string slices to allow a flag to be set multiple times.
func (*StringSlice) Set ¶
func (ss *StringSlice) Set(value string) error
Set implements the flag.Value interface.
func (*StringSlice) String ¶
func (ss *StringSlice) String() string
Click to show internal directories.
Click to hide internal directories.