Display usage information on error.

This commit is contained in:
Alec Thomas
2018-06-21 10:08:01 +10:00
parent d9c0dd25b1
commit cdcdf49f67
7 changed files with 53 additions and 16 deletions
+12
View File
@@ -0,0 +1,12 @@
package kong
// ParseError is the error type returned by Kong.Parse().
//
// It contains the parse Context that triggered the error.
type ParseError struct {
error
Context *Context
}
// Cause returns the original cause of the error.
func (p *ParseError) Cause() error { return p.error }