Documentation ¶
Index ¶
- Variables
- func FilesExisting(files ...string) []string
- func FindFilesInDir(dir string, name string) ([]string, error)
- func GetInterfaceIpv4Addr(interfaceName string) (string, error)
- func GlobInDir(dir, pattern string) ([]string, error)
- func GoModule(searchPath string) (string, error)
- func GoPath() (string, error)
- func JoinCamelCase(ss []string) string
- func NewNitricLogFile(stackPath string) (string, error)
- func NewNotSupportedErr(message string) error
- func NitricConfigDir() string
- func NitricHomeDir() string
- func NitricLocalPassphrasePath() string
- func NitricLogDir(stackPath string) string
- func NitricPreferencesPath() string
- func NitricRunDir() string
- func NitricStacksDir() (string, error)
- func NitricTemplatesDir() string
- func SplitPath(p string) []string
- func StringTrunc(s string, max int) string
- func Take(n int) ([]int, error)
- type GetterClient
- type NotSupportedError
Constants ¶
This section is empty.
Variables ¶
var ( // Raw is the string representation of the version. This will be replaced // with the calculated version at build time. // set in the Makefile. Version = "was not built with version info" // Commit is the commit hash from which the software was built. // Set via LDFLAGS in Makefile. Commit = "unknown" // BuildTime is the string representation of build time. // Set via LDFLAGS in Makefile. BuildTime = "unknown" )
Functions ¶
func FilesExisting ¶ added in v1.3.0
func GetInterfaceIpv4Addr ¶ added in v1.4.0
func JoinCamelCase ¶ added in v1.1.0
func NewNitricLogFile ¶
NewNitricLogFile returns a path to a unique log file that does not exist.
func NewNotSupportedErr ¶
func NitricConfigDir ¶
func NitricConfigDir() string
NitricConfigDir returns the directory to find configuration.
func NitricHomeDir ¶ added in v1.6.0
func NitricHomeDir() string
NitricHomeDir gets the nitric home directory
func NitricLocalPassphrasePath ¶ added in v1.7.0
func NitricLocalPassphrasePath() string
func NitricLogDir ¶
NitricLogDir returns the directory to find log files.
func NitricPreferencesPath ¶ added in v1.5.0
func NitricPreferencesPath() string
func NitricRunDir ¶
func NitricRunDir() string
NitricRunDir returns the directory to place runtime data.
func NitricStacksDir ¶ added in v1.6.0
func NitricTemplatesDir ¶
func NitricTemplatesDir() string
NitricTemplatesDir returns the directory to place template related data.
func SplitPath ¶
SplitPath - splits a path into its component parts, ignoring leading or trailing slashes. e.g - SplitPath("/one/two/three/") == SplitPath("/one/two/three") == SplitPath("one/two/three") == ["one" "two" "three"]
func StringTrunc ¶ added in v1.1.0
Types ¶
type GetterClient ¶
type GetterClient interface {
Get() error
}
GetterClient exists because go-getter does not have an interface to mock.
func NewGetter ¶
func NewGetter(c *getter.Client) GetterClient
type NotSupportedError ¶
type NotSupportedError struct {
// contains filtered or unexported fields
}
NotSupportedError indicates that a request operation cannot be performed, because it is unsupported. Functions and methods should not return this error but should instead return an error including appropriate context that satisfies
errors.Is(err, errors.NotSupportedError)
either by directly wrapping NotSupportedError or by implementing an Is method.
func (*NotSupportedError) Is ¶
func (*NotSupportedError) Is(err error) bool