Help us shape the future of Go! Take the 2026 Go Developer Survey

tools

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapitalizeFirstWord

func CapitalizeFirstWord(str string) string

CapitalizeFirstWord capitalizes only first character in the string

func CommandBinaryName added in v2.0.6

func CommandBinaryName(name string) (string, error)

CommandBinaryName returns the canonical binary name for a package command.

func CreateExclusive added in v2.0.6

func CreateExclusive(dir, name string, perm os.FileMode) (*os.File, error)

CreateExclusive removes any existing output and creates name exclusively in dir.

func GetAkamaiCliPath

func GetAkamaiCliPath() (string, error)

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

func GetAkamaiCliSrcPath() (string, error)

GetAkamaiCliSrcPath returns $AKAMAI_CLI_HOME/.akamai-cli/src

func GetAkamaiCliVenvPath

func GetAkamaiCliVenvPath() (string, error)

GetAkamaiCliVenvPath - returns the .akamai-cli/venv path, for Python virtualenv

func GetPkgVenvPath

func GetPkgVenvPath(pkgName string) (string, error)

GetPkgVenvPath - returns the package virtualenv path

func Githubize

func Githubize(repo string) string

Githubize returns the GitHub package repository URI

func InsertAfterNthWord

func InsertAfterNthWord(s, val string, index int) string

InsertAfterNthWord inserts one string into another after the nth word specified by index

func MoveFile

func MoveFile(src, dst string) (err error)

MoveFile must copy+unlink the file because moving files is broken across filesystems

func NormalizeCommandName added in v2.0.6

func NormalizeCommandName(name string) (string, error)

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

func RemoveOutput(path string) error

RemoveOutput removes an existing output file or symlink without failing when it is absent.

func Self

func Self() string

Self ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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