mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
all: remove pkg/errors
This commit is contained in:
committed by
Ariel Mashraki
parent
f0710aa004
commit
eb87d64980
@@ -8,8 +8,6 @@ import (
|
||||
"fmt"
|
||||
|
||||
"entgo.io/ent/dialect/gremlin/encoding/graphson"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -58,7 +56,7 @@ func (e Edge) MarshalGraphson() ([]byte, error) {
|
||||
func (e *Edge) UnmarshalGraphson(data []byte) error {
|
||||
var edge edge
|
||||
if err := graphson.Unmarshal(data, &edge); err != nil {
|
||||
return errors.Wrap(err, "unmarshaling edge")
|
||||
return fmt.Errorf("unmarshaling edge: %w", err)
|
||||
}
|
||||
|
||||
*e = NewEdge(
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
package graph
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ValueMap models a .valueMap() gremlin response.
|
||||
@@ -47,10 +48,10 @@ func (m ValueMap) decode(v interface{}) error {
|
||||
|
||||
dec, err := mapstructure.NewDecoder(&cfg)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "creating structure decoder")
|
||||
return fmt.Errorf("creating structure decoder: %w", err)
|
||||
}
|
||||
if err := dec.Decode(m); err != nil {
|
||||
return errors.Wrap(err, "decoding value map")
|
||||
return fmt.Errorf("decoding value map: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user