Documentation
¶
Index ¶
- func GetPathAddress(val interface{}, path string) (tezos.Address, bool)
- func GetPathBig(val interface{}, path string) (*big.Int, bool)
- func GetPathInt64(val interface{}, path string) (int64, bool)
- func GetPathString(val interface{}, path string) (string, bool)
- func GetPathTime(val interface{}, path string) (time.Time, bool)
- func GetPathValue(val interface{}, path string) (interface{}, bool)
- func GetPathZ(val interface{}, path string) (tezos.Z, bool)
- func HasPath(val interface{}, path string) bool
- func Min(x, y int) int
- func NonNil(vals ...interface{}) interface{}
- func ParseU64(s string) (u uint64)
- func ShortDurationString(s string) string
- func ToString(t any) string
- func WalkValueMap(name string, val interface{}, fn ValueWalkerFunc) error
- type Bool
- type HexBytes
- type StringList
- type Time
- type ValueWalkerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPathInt64 ¶
func GetPathString ¶
Access nested map or array contents
func GetPathValue ¶
func ShortDurationString ¶
func WalkValueMap ¶
func WalkValueMap(name string, val interface{}, fn ValueWalkerFunc) error
Types ¶
type HexBytes ¶
type HexBytes []byte
HexBytes represents bytes as a JSON string of hexadecimal digits
func (HexBytes) MarshalText ¶
MarshalText converts a byte slice to a hex encoded string. It implements the encoding.TextMarshaler interface, so that HexBytes can be used in Go structs in combination with the standard JSON library.
func (*HexBytes) ReadBytes ¶
ReadBytes copies size bytes from r into h. If h is nil or too short, a new byte slice is allocated. Fails with io.ErrShortBuffer when less than size bytes can be read from r.
func (*HexBytes) UnmarshalText ¶
UnmarshalText umarshals a hex string to bytes. It implements the encoding.TextUnmarshaler interface, so that HexBytes can be used in Go structs in combination with the standard JSON library.
type StringList ¶
type StringList []string
func (*StringList) UnmarshalJSON ¶
func (l *StringList) UnmarshalJSON(data []byte) error
func (*StringList) UnmarshalText ¶
func (l *StringList) UnmarshalText(data []byte) error