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

Method GetUint8

pkg/event/param.go:338–348  ·  view source on GitHub ↗

GetUint8 returns the underlying uint8 value from the parameter.

(name string)

Source from the content-addressed store, hash-verified

336
337// GetUint8 returns the underlying uint8 value from the parameter.
338func (pars Params) GetUint8(name string) (uint8, error) {
339 par, err := pars.findParam(name)
340 if err != nil {
341 return uint8(0), err
342 }
343 v, ok := par.Value.(uint8)
344 if !ok {
345 return uint8(0), fmt.Errorf("unable to type cast %q parameter to uint8 value", name)
346 }
347 return v, nil
348}
349
350// GetBool returns the underlying boolean value from the parameter.
351func (pars Params) GetBool(name string) (bool, error) {

Callers 4

AddThreadMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
newEventDictFunction · 0.80

Calls 1

findParamMethod · 0.95

Tested by

no test coverage detected