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

Method GetUint32

pkg/event/param.go:443–453  ·  view source on GitHub ↗

GetUint32 returns the underlying uint32 value from the parameter.

(name string)

Source from the content-addressed store, hash-verified

441
442// GetUint32 returns the underlying uint32 value from the parameter.
443func (pars Params) GetUint32(name string) (uint32, error) {
444 par, err := pars.findParam(name)
445 if err != nil {
446 return uint32(0), err
447 }
448 v, ok := par.Value.(uint32)
449 if !ok {
450 return uint32(0), fmt.Errorf("unable to type cast %q parameter to uint32 value", name)
451 }
452 return v, nil
453}
454
455// MustGetUint32 returns the underlying uint32 value parameter. It panics if
456// an error occurs while trying to get the parameter.

Callers 15

MustGetUint32Method · 0.95
TryGetUint32Method · 0.95
AddModuleMethod · 0.80
AddMmapMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
newEventDictFunction · 0.80

Calls 1

findParamMethod · 0.95

Tested by

no test coverage detected