feat: gitea client
This commit is contained in:
21
vendor/github.com/alecthomas/kong/error.go
generated
vendored
Normal file
21
vendor/github.com/alecthomas/kong/error.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
exitCode int
|
||||
}
|
||||
|
||||
// Unwrap returns the original cause of the error.
|
||||
func (p *ParseError) Unwrap() error { return p.error }
|
||||
|
||||
// ExitCode returns the status that Kong should exit with if it fails with a ParseError.
|
||||
func (p *ParseError) ExitCode() int {
|
||||
if p.exitCode == 0 {
|
||||
return exitNotOk
|
||||
}
|
||||
return p.exitCode
|
||||
}
|
||||
Reference in New Issue
Block a user