GetUint8 returns the underlying uint8 value from the parameter.
(name string)
| 336 | |
| 337 | // GetUint8 returns the underlying uint8 value from the parameter. |
| 338 | func (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. |
| 351 | func (pars Params) GetBool(name string) (bool, error) { |
no test coverage detected