Documentation ¶
Index ¶
- func Arg0() string
- func Arg0Base() string
- func CheckPrivateFile(f string) error
- func CmdAddEnv(cmd *exec.Cmd, k, v string) bool
- func CmdCopyEnv(cmd *exec.Cmd, k string) bool
- func Exist(path string) (bool, error)
- func IsDir(path string) (bool, error)
- func IsRegular(path string) (bool, error)
- func IsSock(path string) (bool, error)
- func ReadOptionalTokenFile(f string) (string, bool, error)
- func ReadPrivateFile(f string) ([]byte, error)
- func ReadTokenFile(f string) (string, error)
- type Home
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arg0Base ¶
func Arg0Base() string
Arg0Base returns the base name of the first arg, which often represents the name of the binary.
func CheckPrivateFile ¶
CheckPrivateFile checks if the file is of the right permission bits.
func CmdAddEnv ¶
CmdAddEnv adds an environment variable to cmd and returns true. If v is an empty string, nothing is added, and it returns false.
func CmdCopyEnv ¶
CmdCopyEnv copies the value of environment variable k to cmd. If the value is empty, returns false; otherwise returns true.
func ReadOptionalTokenFile ¶
ReadOptionalTokenFile reads an optional token file.
func ReadPrivateFile ¶
ReadPrivateFile reads the confent of a file. The file must be mode 0600.
func ReadTokenFile ¶
ReadTokenFile reads a token string from a file.
Types ¶
type Home ¶
type Home struct {
// contains filtered or unexported fields
}
Home is a directory for referecing files under a directory.