Documentation ¶
Index ¶
- func Nothing(v ...any) string
- type Cast
- func (Cast) StringToDate(s string) (time.Time, error)
- func (Cast) StringToDateInDefaultLocation(s string, location *time.Location) (time.Time, error)
- func (Cast) ToBool(i interface{}) bool
- func (Cast) ToBoolE(i interface{}) (bool, error)
- func (Cast) ToBoolSlice(i interface{}) []bool
- func (Cast) ToBoolSliceE(i interface{}) ([]bool, error)
- func (Cast) ToDuration(i interface{}) time.Duration
- func (Cast) ToDurationE(i interface{}) (d time.Duration, err error)
- func (Cast) ToDurationSlice(i interface{}) []time.Duration
- func (Cast) ToDurationSliceE(i interface{}) ([]time.Duration, error)
- func (Cast) ToFloat32(i interface{}) float32
- func (Cast) ToFloat32E(i interface{}) (float32, error)
- func (Cast) ToFloat64(i interface{}) float64
- func (Cast) ToFloat64E(i interface{}) (float64, error)
- func (Cast) ToInt(i interface{}) int
- func (Cast) ToInt16(i interface{}) int16
- func (Cast) ToInt16E(i interface{}) (int16, error)
- func (Cast) ToInt32(i interface{}) int32
- func (Cast) ToInt32E(i interface{}) (int32, error)
- func (Cast) ToInt64(i interface{}) int64
- func (Cast) ToInt64E(i interface{}) (int64, error)
- func (Cast) ToInt8(i interface{}) int8
- func (Cast) ToInt8E(i interface{}) (int8, error)
- func (Cast) ToIntE(i interface{}) (int, error)
- func (Cast) ToIntSlice(i interface{}) []int
- func (Cast) ToIntSliceE(i interface{}) ([]int, error)
- func (Cast) ToSlice(i interface{}) []interface{}
- func (Cast) ToSliceE(i interface{}) ([]interface{}, error)
- func (Cast) ToString(i interface{}) string
- func (Cast) ToStringE(i interface{}) (string, error)
- func (Cast) ToStringMap(i interface{}) map[string]interface{}
- func (Cast) ToStringMapBool(i interface{}) map[string]bool
- func (Cast) ToStringMapBoolE(i interface{}) (map[string]bool, error)
- func (Cast) ToStringMapE(i interface{}) (map[string]interface{}, error)
- func (Cast) ToStringMapInt(i interface{}) map[string]int
- func (Cast) ToStringMapInt64(i interface{}) map[string]int64
- func (Cast) ToStringMapInt64E(i interface{}) (map[string]int64, error)
- func (Cast) ToStringMapIntE(i interface{}) (map[string]int, error)
- func (Cast) ToStringMapString(i interface{}) map[string]string
- func (Cast) ToStringMapStringE(i interface{}) (map[string]string, error)
- func (Cast) ToStringMapStringSlice(i interface{}) map[string][]string
- func (Cast) ToStringMapStringSliceE(i interface{}) (map[string][]string, error)
- func (Cast) ToStringSlice(i interface{}) []string
- func (Cast) ToStringSliceE(i interface{}) ([]string, error)
- func (Cast) ToTime(i interface{}) time.Time
- func (Cast) ToTimeE(i interface{}) (tim time.Time, err error)
- func (Cast) ToTimeInDefaultLocation(i interface{}, location *time.Location) time.Time
- func (Cast) ToTimeInDefaultLocationE(i interface{}, location *time.Location) (tim time.Time, err error)
- func (Cast) ToUint(i interface{}) uint
- func (Cast) ToUint16(i interface{}) uint16
- func (Cast) ToUint16E(i interface{}) (uint16, error)
- func (Cast) ToUint32(i interface{}) uint32
- func (Cast) ToUint32E(i interface{}) (uint32, error)
- func (Cast) ToUint64(i interface{}) uint64
- func (Cast) ToUint64E(i interface{}) (uint64, error)
- func (Cast) ToUint8(i interface{}) uint8
- func (Cast) ToUint8E(i interface{}) (uint8, error)
- func (Cast) ToUintE(i interface{}) (uint, error)
- type Codec
- func (Codec) ByteToString(b []byte) string
- func (Codec) IndentByte(i int, data []byte) []byte
- func (Codec) JsonDecode(v []byte) (map[string]interface{}, error)
- func (Codec) JsonEncode(v any, pretty bool) ([]byte, error)
- func (Codec) Markdown(data []byte) []byte
- func (Codec) StringToByte(s string) []byte
- func (Codec) TomlDecode(v []byte) (map[string]interface{}, error)
- func (Codec) TomlEncode(v any) ([]byte, error)
- func (Codec) YamlDecode(v []byte) (map[string]interface{}, error)
- func (Codec) YamlEncode(v any) ([]byte, error)
- type Crypto
- func (Crypto) Base64(v any) (string, error)
- func (Crypto) Base64B(v []byte) string
- func (Crypto) Base64Decode(v any) ([]byte, error)
- func (Crypto) FNV32a(v any) (int, error)
- func (Crypto) HMAC(h interface{}, k interface{}, m interface{}) (string, error)
- func (Crypto) MD5(v any) (string, error)
- func (Crypto) MD5B(v []byte) []byte
- func (Crypto) SHA1(v any) (string, error)
- func (Crypto) SHA1B(v []byte) []byte
- func (Crypto) SHA256(v any) (string, error)
- func (Crypto) SHA256B(v []byte) []byte
- type Exec
- type ExecTemplate
- type Faker
- type File
- type HTML2
- type Humanize
- func (Humanize) BigBytes(s *big.Int) string
- func (Humanize) BigComma(b *big.Int) string
- func (Humanize) BigCommaf(v *big.Float) string
- func (Humanize) BigIBytes(s *big.Int) string
- func (Humanize) Bytes(v uint64) string
- func (Humanize) Comma(v int64) string
- func (Humanize) Commaf(v float64) string
- func (Humanize) CommafWithDigits(f float64, decimals int) string
- func (Humanize) ComputeSI(input float64) (float64, string)
- func (Humanize) CustomRelTime(a time.Time, b time.Time, albl string, blbl string, ...) string
- func (Humanize) FormatFloat(format string, n float64) string
- func (Humanize) FormatInteger(format string, n int) string
- func (Humanize) Ftoa(num float64) string
- func (Humanize) FtoaWithDigits(num float64, digits int) string
- func (Humanize) IBytes(v uint64) string
- func (Humanize) Ordinal(x int) string
- func (Humanize) ParseBigBytes(s string) (*big.Int, error)
- func (Humanize) ParseBytes(s string) (uint64, error)
- func (Humanize) RelTime(a time.Time, b time.Time, albl string, blbl string) string
- func (Humanize) SI(input float64, unit string) string
- func (Humanize) Time(then time.Time) string
- type Log
- type Map
- type Minify
- type Os
- type Time
- func (Time) AddDate(t time.Time, years, months, days int) time.Time
- func (Time) AddDuration(t time.Time, d time.Duration) time.Time
- func (Time) Duration(d string) (time.Duration, error)
- func (Time) Format(format string, t time.Time) string
- func (Time) Now() time.Time
- func (Time) RFC3339() string
- func (Time) UTC(t time.Time) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cast ¶
type Cast struct{}
Cast is a collection of cast github.com/spf13/cast functions.
func (Cast) StringToDateInDefaultLocation ¶
func (Cast) ToBoolSlice ¶
func (Cast) ToBoolSliceE ¶
func (Cast) ToDuration ¶
func (Cast) ToDurationSlice ¶
func (Cast) ToFloat32E ¶
func (Cast) ToFloat64E ¶
func (Cast) ToIntSlice ¶
func (Cast) ToIntSliceE ¶
func (Cast) ToStringMap ¶
func (Cast) ToStringMapBool ¶
func (Cast) ToStringMapE ¶
func (Cast) ToStringMapInt ¶
func (Cast) ToStringMapInt64 ¶
func (Cast) ToStringMapInt64E ¶
func (Cast) ToStringMapString ¶
func (Cast) ToStringMapStringE ¶
func (Cast) ToStringMapStringSlice ¶
func (Cast) ToStringMapStringSliceE ¶
func (Cast) ToStringSlice ¶
func (Cast) ToStringSliceE ¶
func (Cast) ToTimeInDefaultLocation ¶
func (Cast) ToTimeInDefaultLocationE ¶
type Crypto ¶
type Crypto struct{}
type ExecTemplate ¶
type ExecTemplate struct {
// contains filtered or unexported fields
}
func (*ExecTemplate) ExecTemplate ¶
func (e *ExecTemplate) ExecTemplate(name string, v any) (string, error)
type HTML2 ¶ added in v0.3.0
type HTML2 struct{}
func (HTML2) EscapeString ¶ added in v0.3.0
func (HTML2) UnescapeString ¶ added in v0.3.0
type Humanize ¶
type Humanize struct{}
Humanize is a collection of humanize github.com/dustin/go-humanize functions.
func (Humanize) CustomRelTime ¶
type Os ¶
type Os struct {
// contains filtered or unexported fields
}
func (*Os) FileExists ¶
FileExists checks whether a file exists under the given path.
Click to show internal directories.
Click to hide internal directories.