Skip to content

Commit

Permalink
all: use xerrors
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathaningram committed Apr 27, 2022
1 parent 3b2bd3d commit b522844
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion filtering/errors.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package filtering

import (
"errors"
"fmt"
"strings"

errors "golang.org/x/xerrors"
)

type filterError interface {
Expand Down
3 changes: 2 additions & 1 deletion filtering/lexer.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package filtering

import (
"errors"
"fmt"
"io"
"unicode"
"unicode/utf8"

errors "golang.org/x/xerrors"
)

// Lexer is a filter expression lexer.
Expand Down
3 changes: 2 additions & 1 deletion filtering/parser.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package filtering

import (
"errors"
"fmt"
"io"
"strconv"
"strings"

errors "golang.org/x/xerrors"

expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.17
require (
github.com/google/uuid v1.3.0
github.com/stoewer/go-strcase v1.2.0
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/genproto v0.0.0-20220111164026-67b88f271998
google.golang.org/grpc v1.40.1
google.golang.org/protobuf v1.27.1
Expand All @@ -17,5 +18,4 @@ require (
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/text v0.3.5 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
)
3 changes: 2 additions & 1 deletion pagination/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package pagination
import (
"encoding/base64"
"encoding/gob"
"errors"
"fmt"
"io"
"strings"

errors "golang.org/x/xerrors"
)

// EncodePageTokenStruct encodes an arbitrary struct as a page token.
Expand Down
3 changes: 2 additions & 1 deletion validation/messagevalidator.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package validation

import (
"errors"
"fmt"
"strings"

errors "golang.org/x/xerrors"

"google.golang.org/genproto/googleapis/rpc/errdetails"
)

Expand Down

0 comments on commit b522844

Please sign in to comment.