Documentation ¶
Index ¶
- Constants
- Variables
- func CheckWorkspace()
- func CopyDirRecursively(sourceDir, destDir string) error
- func CopyFile(sourceFile, destFile string)
- func CutPrefix(str string, prefix string) (string, bool)
- func DirExists(dir string) bool
- func EnsureManagedDir(dir string)
- func FileExists(file string) bool
- func GetModuleRoot() string
- func GetModuleRootForPath(p string) string
- func GetWorkingDir() string
- func GetWorkspaceRoot() string
- func MkdirAll(p string)
- func ReadFile(filePath string) []byte
- func ReadJson(filePath string, v interface{})
- func ReadYaml(filePath string, v interface{})
- func RemoveDir(p string)
- func Version() string
- func VersionTriplet() [3]uint
- func WalkSymlink(root string, walkFn filepath.WalkFunc) error
- func WriteFile(filePath string, data []byte)
- func WriteJson(filePath string, v interface{})
- func WriteYaml(filePath string, v interface{})
Constants ¶
View Source
const ( ModuleFileName = "MODULE" ModuleSyntaxVersion = 3 BuildDirName = "BUILD" // DepsDirName is directory that dependencies are stored in. DepsDirName = "DEPS" WarningFileName = "WARNING.readme.txt" )
ModuleFileName is the name of the file describing each module.
Variables ¶
View Source
var FlagNoWorkspaceChecks = false
Functions ¶
func CheckWorkspace ¶ added in v1.3.15
func CheckWorkspace()
func CopyDirRecursively ¶ added in v1.3.2
Copies a directory recursing into its inner directories
func CutPrefix ¶ added in v1.3.12
Reimplementation of CutPrefix for backwards compatibility with versions < 1.20
func EnsureManagedDir ¶ added in v1.3.15
func EnsureManagedDir(dir string)
func GetModuleRoot ¶
func GetModuleRoot() string
GetModuleRoot returns the root directory of the current module.
func GetModuleRootForPath ¶
func GetWorkingDir ¶ added in v0.1.4
func GetWorkingDir() string
GetWorkingDir returns the current working directory.
func GetWorkspaceRoot ¶
func GetWorkspaceRoot() string
GetWorkspaceRoot returns the root directory of the current workspace (i.e., top-level module).
func MkdirAll ¶ added in v1.0.0
func MkdirAll(p string)
MkdirAll creates directory `p` and all parent directories.
func VersionTriplet ¶ added in v1.4.0
func VersionTriplet() [3]uint
func WalkSymlink ¶
WalkSymlink works like filepath.Walk but also accepts symbolic links as `root`.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.