Documentation ¶
Index ¶
- Variables
- func AvailableFilePath(filePath string) string
- func EnsureDirectory(dirPath string)
- func FileBase(filePath string) string
- func HasOnePrefix(s string, prefixes []string) bool
- func NormalizeToPath(str string) string
- func NormalizeToSiteID(str string) string
- func NormalizeToUsername(str string) string
- func Pathify(s string) string
- func RandomAlphaNumString(size int) string
- func Urlify(str string) string
- func WorkingDir() string
Constants ¶
This section is empty.
Variables ¶
View Source
var AlphaNumChars = []rune("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
AlphaNumChars holds all alphanumeric runes
Functions ¶
func AvailableFilePath ¶
AvailableFilePath returns filePath is available, otherwise returns a path with a random filename
func EnsureDirectory ¶
func EnsureDirectory(dirPath string)
EnsureDirectory ensures that given directory exists
func HasOnePrefix ¶
HasOnePrefix returns true if string has one of given prefixes
func NormalizeToPath ¶
NormalizeToPath normalizes argument to a string that can be a file or URL path
func NormalizeToSiteID ¶
NormalizeToSiteID normalizes argument to a string that can be a site id
func NormalizeToUsername ¶
NormalizeToUsername normalizes argument to a string that can be a username
func RandomAlphaNumString ¶
RandomAlphaNumString generates a random alphanumeric string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.