Documentation ¶
Overview ¶
Code below generated from scalar_gen.go.tmpl
Index ¶
- Variables
- type BoolToScalar
- type BoolToSymBool
- type BoolToSymF
- type BoolToSymS
- type BoolToSymStr
- type BoolToSymU
- type BytesToScalar
- type DisplayFormat
- type Fn
- type Mapper
- type S
- func (s S) ActualBitBuf() *bitio.Buffer
- func (s S) ActualBool() bool
- func (s S) ActualF() float64
- func (s S) ActualS() int64
- func (s S) ActualStr() string
- func (s S) ActualU() uint64
- func (s S) SymBitBuf() *bitio.Buffer
- func (s S) SymBool() bool
- func (s S) SymF() float64
- func (s S) SymS() int64
- func (s S) SymStr() string
- func (s S) SymU() uint64
- func (s S) Value() interface{}
- type SRangeEntry
- type SRangeToScalar
- type SToScalar
- type SToSymBool
- type SToSymF
- type SToSymS
- type SToSymStr
- type SToSymU
- type StrToScalar
- type StrToSymBool
- type StrToSymF
- type StrToSymS
- type StrToSymStr
- type StrToSymU
- type URangeEntry
- type URangeToScalar
- type UToScalar
- type UToSymBool
- type UToSymF
- type UToSymS
- type UToSymStr
- type UToSymU
Constants ¶
This section is empty.
Variables ¶
View Source
var Bin = Fn(func(s S) (S, error) { s.ActualDisplay = NumberBinary; return s, nil })
View Source
var Dec = Fn(func(s S) (S, error) { s.ActualDisplay = NumberDecimal; return s, nil })
View Source
var Oct = Fn(func(s S) (S, error) { s.ActualDisplay = NumberOctal; return s, nil })
View Source
var RawHex = Fn(func(s S) (S, error) { return rawSym(s, -1, func(b []byte) string { return fmt.Sprintf("%x", b) }) })
View Source
var RawHexReverse = Fn(func(s S) (S, error) { return rawSym(s, -1, func(b []byte) string { return fmt.Sprintf("%x", bitio.ReverseBytes(append([]byte{}, b...))) }) })
View Source
var RawSym = Fn(func(s S) (S, error) { return rawSym(s, -1, func(b []byte) string { return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) }) })
View Source
var RawUUID = Fn(func(s S) (S, error) { return rawSym(s, -1, func(b []byte) string { return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) }) })
View Source
var SymBin = Fn(func(s S) (S, error) { s.SymDisplay = NumberBinary; return s, nil })
View Source
var SymDec = Fn(func(s S) (S, error) { s.SymDisplay = NumberDecimal; return s, nil })
View Source
var SymOct = Fn(func(s S) (S, error) { s.SymDisplay = NumberOctal; return s, nil })
Functions ¶
This section is empty.
Types ¶
type BoolToScalar ¶
type BoolToSymBool ¶
type BoolToSymF ¶
type BoolToSymS ¶
type BoolToSymStr ¶
type BoolToSymU ¶
type BytesToScalar ¶
type DisplayFormat ¶
type DisplayFormat int
const ( NumberDecimal DisplayFormat = iota NumberBinary NumberOctal NumberHex )
func (DisplayFormat) FormatBase ¶
func (df DisplayFormat) FormatBase() int
type Mapper ¶
func Description ¶
type S ¶
type S struct { Actual interface{} // int, int64, uint64, float64, string, bool, []byte, *bitio.Buffer ActualDisplay DisplayFormat Sym interface{} SymDisplay DisplayFormat Description string Unknown bool }
func (S) ActualBitBuf ¶
ActualBitBuf asserts actual value is a BitBuf and returns it
func (S) ActualBool ¶
ActualBool asserts actual value is a Bool and returns it
type SRangeEntry ¶ added in v0.0.3
SRangeToScalar maps ranges to a scalar, first in range is chosen
type SRangeToScalar ¶
type SRangeToScalar []SRangeEntry
SRangeToScalar maps sint64 ranges to a scalar, first in range is chosen
type SToSymBool ¶
type StrToScalar ¶
type StrToSymBool ¶
type StrToSymStr ¶
type URangeEntry ¶ added in v0.0.3
type URangeToScalar ¶
type URangeToScalar []URangeEntry
URangeToScalar maps uint64 ranges to a scalar, first in range is chosen
type UToSymBool ¶
Click to show internal directories.
Click to hide internal directories.