Documentation
¶
Index ¶
- func CapitalizeFirstWord(str string) string
- func CommandBinaryName(name string) (string, error)
- func CreateExclusive(dir, name string, perm os.FileMode) (*os.File, error)
- func GetAkamaiCliPath() (string, error)
- func GetAkamaiCliSrcPath() (string, error)
- func GetAkamaiCliVenvPath() (string, error)
- func GetPkgVenvPath(pkgName string) (string, error)
- func Githubize(repo string) string
- func InsertAfterNthWord(s, val string, index int) string
- func MoveFile(src, dst string) (err error)
- func NormalizeCommandName(name string) (string, error)
- func RemoveOutput(path string) error
- func Self() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapitalizeFirstWord ¶
CapitalizeFirstWord capitalizes only first character in the string
func CommandBinaryName ¶ added in v2.0.6
CommandBinaryName returns the canonical binary name for a package command.
func CreateExclusive ¶ added in v2.0.6
CreateExclusive removes any existing output and creates name exclusively in dir.
func GetAkamaiCliPath ¶
GetAkamaiCliPath returns the "$AKAMAI_CLI_HOME/.akamai-cli" value and tries to create it if not existing.
Errors out if:
* $AKAMAI_CLI_HOME is not defined
* $AKAMAI_CLI_HOME/.akamai-cli does not exist, and we cannot create it
func GetAkamaiCliSrcPath ¶
GetAkamaiCliSrcPath returns $AKAMAI_CLI_HOME/.akamai-cli/src
func GetAkamaiCliVenvPath ¶
GetAkamaiCliVenvPath - returns the .akamai-cli/venv path, for Python virtualenv
func GetPkgVenvPath ¶
GetPkgVenvPath - returns the package virtualenv path
func InsertAfterNthWord ¶
InsertAfterNthWord inserts one string into another after the nth word specified by index
func MoveFile ¶
MoveFile must copy+unlink the file because moving files is broken across filesystems
func NormalizeCommandName ¶ added in v2.0.6
NormalizeCommandName converts a package command name to its canonical form and rejects values that cannot safely be used as a command identifier.
func RemoveOutput ¶ added in v2.0.6
RemoveOutput removes an existing output file or symlink without failing when it is absent.
Types ¶
This section is empty.