mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
fix: error formatting
This commit is contained in:
parent
023cbc81bc
commit
8b3e058885
3 changed files with 7 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
|||
package acl
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
|
@ -37,9 +36,9 @@ var errMatcherFormat = gperr.Multiline().AddLines(
|
|||
)
|
||||
|
||||
var (
|
||||
errSyntax = errors.New("syntax error")
|
||||
errInvalidIP = errors.New("invalid IP")
|
||||
errInvalidCIDR = errors.New("invalid CIDR")
|
||||
errSyntax = gperr.New("syntax error")
|
||||
errInvalidIP = gperr.New("invalid IP")
|
||||
errInvalidCIDR = gperr.New("invalid CIDR")
|
||||
)
|
||||
|
||||
func (matcher *Matcher) Parse(s string) error {
|
||||
|
|
|
@ -136,6 +136,9 @@ func (err *withSubject) MarshalJSON() ([]byte, error) {
|
|||
Subjects: subjects,
|
||||
Err: err.Err,
|
||||
}
|
||||
if err.pendingSubject != "" {
|
||||
reversed.Subjects = append(reversed.Subjects, err.pendingSubject)
|
||||
}
|
||||
|
||||
return json.Marshal(reversed)
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ type (
|
|||
}
|
||||
)
|
||||
|
||||
var ErrNegativeInterval = errors.New("negative interval")
|
||||
var ErrNegativeInterval = gperr.New("negative interval")
|
||||
|
||||
func NewMonitor(r routes.Route) health.HealthMonCheck {
|
||||
var mon health.HealthMonCheck
|
||||
|
|
Loading…
Add table
Reference in a new issue