Documentation
¶
Overview ¶
useful function, like UUID, Assert, Trace and more.
Index ¶
- func Assert(err error)
- func Trace(prefix string) []string
- func UUID(n int, chars ...string) (string, error)
- type Bytes
- func (data *Bytes) Bytes() uint64
- func (data Bytes) MarshalJSON() ([]byte, error)
- func (data *Bytes) MarshalKV() (string, error)
- func (data Bytes) MarshalYAML() (interface{}, error)
- func (data Bytes) Number() uint64
- func (data Bytes) String() string
- func (data Bytes) Unit() string
- func (data *Bytes) UnmarshalJSON(value []byte) error
- func (data *Bytes) UnmarshalKV(value string) error
- func (data *Bytes) UnmarshalYAML(value *yaml.Node) error
- type Duration
- type Float64P2
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bytes ¶ added in v1.0.7
type Bytes uint64
Bytes custom bytes struct
func (Bytes) MarshalJSON ¶ added in v1.0.7
MarshalJSON marshal bytes by json
func (Bytes) MarshalYAML ¶ added in v1.0.7
MarshalYAML marshal bytes by yaml
func (*Bytes) UnmarshalJSON ¶ added in v1.0.7
UnmarshalJSON unmarshal bytes by json
func (*Bytes) UnmarshalKV ¶ added in v1.0.7
UnmarshalKV unmarshal bytes by kv
func (*Bytes) UnmarshalYAML ¶ added in v1.0.7
UnmarshalYAML unmarshal bytes by yaml
type Duration ¶ added in v1.0.7
Duration custom duration struct
func (*Duration) UnmarshalKV ¶ added in v1.0.7
UnmarshalKV unmarshal duration
type Float64P2 ¶ added in v1.0.8
type Float64P2 float64
Float64P2 format yaml, json, kv string to 2 precision
func (Float64P2) MarshalJSON ¶ added in v1.0.8
MarshalJSON marshal float64 by json
func (Float64P2) MarshalYAML ¶ added in v1.0.8
MarshalYAML marshal float64 by yaml
type Version ¶ added in v1.4.0
type Version [3]int
Version semantic version
func ParseVersion ¶ added in v1.4.0
ParseVersion parse semantic version string
func (Version) GreaterEqual ¶ added in v1.4.0
Greater validate src version is greater or equal dst version
Click to show internal directories.
Click to hide internal directories.