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

Method TryGetUint16

pkg/event/param.go:421–427  ·  view source on GitHub ↗

TryGetUint16 tries to retrieve the uint16 value from the parameter. Returns the underlying value on success, or zero otherwise.

(name string)

Source from the content-addressed store, hash-verified

419// TryGetUint16 tries to retrieve the uint16 value from the parameter.
420// Returns the underlying value on success, or zero otherwise.
421func (pars Params) TryGetUint16(name string) uint16 {
422 val, err := pars.GetUint16(name)
423 if err != nil {
424 return 0
425 }
426 return val
427}
428
429// GetInt16 returns the underlying int16 value from the parameter.
430func (pars Params) GetInt16(name string) (int16, error) {

Callers 1

resolvePortNameMethod · 0.80

Calls 1

GetUint16Method · 0.95

Tested by

no test coverage detected