Documentation ¶
Index ¶
- Constants
- Variables
- func AtoInt32(text string) (int32, error)
- func CreateUniqueDirectory(dir string, name string, maximumAttempts int) (string, error)
- func FileExists(path string) (bool, error)
- func Int32ToA(n int32) string
- func InvalidArg(value string, values []string) error
- func InvalidArgError(value string, err error) error
- func InvalidArgf(value string, message string, a ...interface{}) error
- func InvalidOption(name string, value string, values []string) error
- func InvalidOptionError(option string, value string, err error) error
- func InvalidOptionf(option string, value string, message string, a ...interface{}) error
- func LoadCacheData(fileName string, loader CacheLoader) ([]byte, error)
- func RegexpSplit(text string, regexSeperator string) []string
- func StringArrayIndex(array []string, value string) int
- func StringIndexes(text string, value string) []int
- func SuggestionsFor(typedName string, values []string, suggestionsMinimumDistance int, ...) []string
- func Unzip(src, dest string) error
- func UrlJoin(paths ...string) string
- type CacheLoader
Constants ¶
View Source
const ( DefaultWritePermissions = 0760 MaximumNewDirectoryAttempts = 1000 )
View Source
const (
DefaultSuggestionsMinimumDistance = 2
)
Variables ¶
View Source
var ColorError = color.New(color.FgRed).SprintFunc()
View Source
var ColorInfo = color.New(color.FgGreen).SprintFunc()
View Source
var ColorStatus = color.New(color.FgBlue).SprintFunc()
View Source
var ColorWarning = color.New(color.FgYellow).SprintFunc()
Functions ¶
func CreateUniqueDirectory ¶ added in v1.0.2
CreateUniqueDirectory creates a new directory but if the combination of dir and name exists then append a number until a unique name is found
func FileExists ¶
func InvalidArg ¶ added in v1.0.2
func InvalidArgError ¶ added in v1.0.2
func InvalidArgf ¶ added in v1.0.2
func InvalidOption ¶ added in v1.0.2
func InvalidOptionError ¶ added in v1.0.2
func InvalidOptionf ¶ added in v1.0.2
func LoadCacheData ¶ added in v1.0.2
func LoadCacheData(fileName string, loader CacheLoader) ([]byte, error)
LoadCacheData loads cached data from the given cache file name and loader
func RegexpSplit ¶
RegexpSplit splits a string into an array using the regexSep as a separator
func StringArrayIndex ¶ added in v1.0.2
func StringIndexes ¶
StringIndexes returns all the indices where the value occurs in the given string
func SuggestionsFor ¶ added in v1.0.2
Types ¶
type CacheLoader ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.