mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-06 22:44:03 +02:00
chore: fix import and err marshal handling
This commit is contained in:
parent
feb9947543
commit
54e4969d26
2 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/yusing/go-proxy/pkg/json"
|
stdJSON "encoding/json"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newError(message string) error {
|
func newError(message string) error {
|
||||||
|
@ -73,7 +73,7 @@ func IsJSONMarshallable(err error) bool {
|
||||||
case *baseError:
|
case *baseError:
|
||||||
return IsJSONMarshallable(err.Err)
|
return IsJSONMarshallable(err.Err)
|
||||||
default:
|
default:
|
||||||
var v json.Marshaler
|
var v stdJSON.Marshaler
|
||||||
return errors.As(err, &v)
|
return errors.As(err, &v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package types
|
package gpnet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
Loading…
Add table
Reference in a new issue