SetResult sets the commands result value to val.
(c Cmd, val interface{})
| 103 | |
| 104 | // SetResult sets the commands result value to val. |
| 105 | func SetResult(c Cmd, val interface{}) error { |
| 106 | if p := c.CmdResult(); p != nil { |
| 107 | p.Set(val) |
| 108 | return nil |
| 109 | } |
| 110 | return ErrResultNotFound |
| 111 | } |