Validate reports whether this Problem value is a valid problem one.
()
| 199 | |
| 200 | // Validate reports whether this Problem value is a valid problem one. |
| 201 | func (p Problem) Validate() bool { |
| 202 | // A nil problem is not a valid one. |
| 203 | if p == nil { |
| 204 | return false |
| 205 | } |
| 206 | |
| 207 | return p.keyExists("type") && |
| 208 | p.keyExists("title") && |
| 209 | p.keyExists("status") |
| 210 | } |
| 211 | |
| 212 | // Error method completes the go error. |
| 213 | // Returns the "[Status] Title" string form of this Problem. |