GetParameter returns the parameter value with the specified name.
(c Cmd, name string)
| 78 | |
| 79 | // GetParameter returns the parameter value with the specified name. |
| 80 | func GetParameter(c Cmd, name string) (interface{}, error) { |
| 81 | if p := c.CmdParams().Find(name); p != nil { |
| 82 | return p.Get(), nil |
| 83 | } |
| 84 | return nil, ErrParameterNotFound |
| 85 | } |
| 86 | |
| 87 | // SetParameter sets the parameter with the specified name with val. |
| 88 | func SetParameter(c Cmd, name string, val interface{}) error { |