Cause sets the problem's cause field. Any chain of problems.
(cause Problem)
| 190 | // Cause sets the problem's cause field. |
| 191 | // Any chain of problems. |
| 192 | func (p Problem) Cause(cause Problem) Problem { |
| 193 | if !cause.Validate() { |
| 194 | return p |
| 195 | } |
| 196 | |
| 197 | return p.Key("cause", cause) |
| 198 | } |
| 199 | |
| 200 | // Validate reports whether this Problem value is a valid problem one. |
| 201 | func (p Problem) Validate() bool { |