TryGetUint16 tries to retrieve the uint16 value from the parameter. Returns the underlying value on success, or zero otherwise.
(name string)
| 419 | // TryGetUint16 tries to retrieve the uint16 value from the parameter. |
| 420 | // Returns the underlying value on success, or zero otherwise. |
| 421 | func (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. |
| 430 | func (pars Params) GetInt16(name string) (int16, error) { |
no test coverage detected