Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GoSrcDirs = goSrcDirs() GoSrcDir = GoSrcDirs[0] // where to find the Go compiler used to compile gomacro. // needed to build compatible plugins GoRootDir = build.Default.GOROOT // a value whose type is defined in the imports package. // used to locate the source directory where to write import files. SymbolFromImportsPackage interface{} = imports.Packages )
Functions ¶
func DirName ¶
return the string up to (but excluding) last '/' in path If path contains no '/', return empty string
func FileName ¶
return the string after last '/' in path If path contains no '/', return path itself
func GetImportsSrcDir ¶
func GetImportsSrcDir() string
lazily compute the directory where to write imports
func RemoveFinalSlash ¶
remove final '/' from string, if present
func UserHomeDir ¶
func UserHomeDir() string
find user's home directory, see https://stackoverflow.com/questions/2552416/how-can-i-find-the-users-home-dir-in-a-cross-platform-manner-using-c without importing "os/user" - which requires cgo to work thus makes cross-compile difficult, see https://github.com/golang/go/issues/11797
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.