Documentation ¶
Index ¶
- func CleanStringArray(s []string) []string
- func Iif(condition bool, trueReturn interface{}, falseReturn interface{}) interface{}
- func IntSliceToString(from []int, delim string) string
- func IntSliceToStringForce(from []interface{}, delim string) string
- func PickOneError(errs ...error) error
- func ToByte(from interface{}) []byte
- func ToDuration(from interface{}) time.Duration
- func ToFloat64(from interface{}) float64
- func ToInt(from interface{}) int
- func ToInt64(from interface{}) int64
- func ToRune(from interface{}) []rune
- func ToString(from interface{}) string
- func TrimLeftChars(s string, n int) string
- type CryptoSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanStringArray ¶
Remove empty strings and dedup the string array
func IntSliceToString ¶
https://stackoverflow.com/questions/37532255/one-liner-to-transform-int-into-string Converts []int{1, 2, 3, 4, 5, 6, 7, 8, 9} to "1,2,3,4,5,6,7,8,9"
func IntSliceToStringForce ¶ added in v1.3.1
Same as IntSliceToString but takes interface{}, don't do stupid stuff
func PickOneError ¶
Return one of the errors it received or nil if no errors was passed
Types ¶
type CryptoSource ¶
type CryptoSource struct{}
func (CryptoSource) Int63 ¶
func (s CryptoSource) Int63() int64
func (CryptoSource) Seed ¶
func (s CryptoSource) Seed(seed int64)
func (CryptoSource) Uint64 ¶
func (s CryptoSource) Uint64() (v uint64)
Click to show internal directories.
Click to hide internal directories.