util

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DepsDirName = "DEPS"

DepsDirName is directory that dependencies are stored in.

View Source
const DirMode = 0775

DirMode is the default FileMode used when creating directories.

View Source
const FileMode = 0664

FileMode is the default FileMode used when creating files.

View Source
const ModuleFileName = "MODULE"

ModuleFileName is the name of the file describing each module.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(sourceFile, destFile string)

func DirExists

func DirExists(dir string) bool

DirExists checks whether some directory exists.

func FileExists

func FileExists(file string) bool

FileExists checks whether some file exists.

func GetModuleRoot

func GetModuleRoot() string

GetModuleRoot returns the root directory of the current module.

func GetModuleRootForPath

func GetModuleRootForPath(p string) string

func GetWorkingDir

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 ReadFile

func ReadFile(filePath string) []byte

func RemoveDir

func RemoveDir(p string)

RemoveDir removes a directory and all of its content.

func WalkSymlink(root string, walkFn filepath.WalkFunc) error

WalkSymlink works like filepath.Walk but also accepts symbolic links as `root`.

func WriteFile

func WriteFile(filePath string, data []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL