GetUint32 returns the underlying uint32 value from the parameter.
(name string)
| 441 | |
| 442 | // GetUint32 returns the underlying uint32 value from the parameter. |
| 443 | func (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. |
no test coverage detected