Documentation ¶
Index ¶
- Constants
- func ContainsString(stringList []string, s string) bool
- func FormatLen(s string) int
- func HumanBytes(size int) string
- func IsUUID(s string) bool
- func JsonDumpsIndent(v interface{}) (string, error)
- func MustGreaterThan(arg string, min int) (int, error)
- func MustInIntChoises(arg string, choises []int) (int, error)
- func MustInRange(arg string, min int, max int) (int, error)
- func MustInStringChoises(arg string, choises []string) error
- func MustLessThen(arg string, min int) (int, error)
- func MustMatch(arg string, pattern string) error
- func PathJoin(path ...string) string
- func ScanfComfirm(message string, yes, no []string) bool
- func SubStrings(s string, width int) []string
- func TextWidth(s string) int
Constants ¶
View Source
const GB = 1 << 30
View Source
const KB = 1 << 10
View Source
const MB = 1 << 20
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶ added in v0.0.6
func HumanBytes ¶ added in v0.0.6
func JsonDumpsIndent ¶ added in v0.0.6
func MustInStringChoises ¶
func ScanfComfirm ¶ added in v0.0.6
func SubStrings ¶ added in v0.0.7
Parse a string to substrings
e.g. if width is 2:
"a" -> ["a"] "abc" -> ["ab", "c"] "abcd" -> ["ab", "cd"]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.