MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / GetUint16

Method GetUint16

pkg/event/param.go:397–407  ·  view source on GitHub ↗

GetUint16 returns the underlying int16 value from the parameter.

(name string)

Source from the content-addressed store, hash-verified

395
396// GetUint16 returns the underlying int16 value from the parameter.
397func (pars Params) GetUint16(name string) (uint16, error) {
398 par, err := pars.findParam(name)
399 if err != nil {
400 return uint16(0), err
401 }
402 v, ok := par.Value.(uint16)
403 if !ok {
404 return uint16(0), fmt.Errorf("unable to type cast %q parameter to uint16 value", name)
405 }
406 return v, nil
407}
408
409// MustGetUint16 returns the underlying uint16 value parameter. It panics if
410// an error occurs while trying to get the parameter.

Callers 7

MustGetUint16Method · 0.95
TryGetUint16Method · 0.95
GetMethod · 0.80
GetMethod · 0.80
newEventDictFunction · 0.80
PartialKeyMethod · 0.80
SummaryMethod · 0.80

Calls 1

findParamMethod · 0.95

Tested by

no test coverage detected