Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandPath ¶
func ExpandPathPOSIX ¶ added in v0.19.0
Example ¶
p, err := ExpandPathPOSIX("~/test") if err != nil { log.Fatal(err) } _, last := filepath.Split(p) fmt.Println(last) p, _ = ExpandPathPOSIX("~NONEXISTINGUSER/path/to/file") fmt.Println(p) p, _ = ExpandPathPOSIX("/path/to/file/tilde/~") fmt.Println(p) p, _ = ExpandPathPOSIX("") fmt.Println(p) p, _ = ExpandPathPOSIX("") fmt.Println(p)
Output: test ~NONEXISTINGUSER/path/to/file /path/to/file/tilde/~
func IntToUInt ¶ added in v0.19.0
IntToUInt safely converts an int to uint. Returns an error if the number is negative.
func IntToUInt64 ¶ added in v0.19.0
IntToUInt64 safely converts an int to uint64. Returns an error if the number is negative.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.