SetValue replaces the value for the given parameter name. It will return an error if the supplied parameter is not present in the parameter map.
(name string, value params.Value)
| 217 | // SetValue replaces the value for the given parameter name. It will return an error |
| 218 | // if the supplied parameter is not present in the parameter map. |
| 219 | func (pars Params) SetValue(name string, value params.Value) error { |
| 220 | _, err := pars.findParam(name) |
| 221 | if err != nil { |
| 222 | return fmt.Errorf("setting the value on a missing %q parameter is not allowed", name) |
| 223 | } |
| 224 | pars[name].Value = value |
| 225 | return nil |
| 226 | } |
| 227 | |
| 228 | // GetRaw returns the raw value for given parameter name. It is the responsibility of the caller to probe type assertion |
| 229 | // on the value before yielding its underlying type. |