MCPcopy Index your code
hub / github.com/kataras/iris / Validate

Method Validate

context/problem.go:201–210  ·  view source on GitHub ↗

Validate reports whether this Problem value is a valid problem one.

()

Source from the content-addressed store, hash-verified

199
200// Validate reports whether this Problem value is a valid problem one.
201func (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.

Callers 1

ErrorMethod · 0.95

Calls 1

keyExistsMethod · 0.95

Tested by

no test coverage detected