MCPcopy Create free account
hub / github.com/brimdata/super / Uint

Method Uint

value.go:84–92  ·  view source on GitHub ↗

Uint returns v's underlying value. It panics if v's underlying type is not TypeUint8, TypeUint16, TypeUint32, or TypeUint64.

()

Source from the content-addressed store, hash-verified

82// Uint returns v's underlying value. It panics if v's underlying type is not
83// TypeUint8, TypeUint16, TypeUint32, or TypeUint64.
84func (v Value) Uint() uint64 {
85 if v.Type().ID() > IDUint64 {
86 panic(fmt.Sprintf("super.Value.Uint called on %T", v.Type()))
87 }
88 if x, ok := v.native(); ok {
89 return x
90 }
91 return DecodeUint(v.bytes())
92}
93
94// Int returns v's underlying value. It panics if v's underlying type is not
95// TypeInt8, TypeInt16, TypeInt32, TypeInt64, TypeDuration, or TypeTime.

Callers 7

AsIntMethod · 0.95
NewConstFromValueFunction · 0.45
encodeAnyMethod · 0.45
decodeAnyMethod · 0.45
getSnapshotMethod · 0.45
formatAnyFunction · 0.45
writePrimitiveMethod · 0.45

Calls 5

TypeMethod · 0.95
nativeMethod · 0.95
bytesMethod · 0.95
DecodeUintFunction · 0.85
IDMethod · 0.65

Tested by

no test coverage detected