Skip to content

Commit

Permalink
Merge pull request #43 from gregwebs/goa-upgrade
Browse files Browse the repository at this point in the history
upgrade errcode and errors
  • Loading branch information
gregwebs authored Jan 22, 2025
2 parents 04c2232 + 27068d7 commit e4f8deb
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
9 changes: 6 additions & 3 deletions goa/go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
module github.com/gregwebs/errcode/goa

go 1.18
go 1.23.3

require (
github.com/gregwebs/errcode v0.11.0
github.com/gregwebs/errors v1.0.0
github.com/gregwebs/errcode v0.30.0
github.com/gregwebs/errors v1.40.1
goa.design/goa/v3 v3.10.0
)

require (
github.com/dimfeld/httptreemux/v5 v5.4.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gregwebs/errors/errwrap v0.1.1 // indirect
github.com/gregwebs/errors/slogerr v0.1.1 // indirect
github.com/gregwebs/stackfmt v0.1.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
)
14 changes: 10 additions & 4 deletions goa/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gregwebs/errcode v0.11.0 h1:LryRBQg6BnqJhPPf5mDLEhLkYLx3mZyRE6Z5QT8djQI=
github.com/gregwebs/errcode v0.11.0/go.mod h1:9hGdc/kIviyBxF9dq0APXLfaDq2IpYg+Wt4kCbk0cQI=
github.com/gregwebs/errors v1.0.0 h1:Ov7HzBs79i7TcqQnfxyxLT8gttpTzGT3cDq70J8zkpE=
github.com/gregwebs/errors v1.0.0/go.mod h1:hUKQdGWTRTHMeAXJudXmN/BMLe+L51MG+OnRz72ZeBc=
github.com/gregwebs/errcode v0.30.0 h1:1XylZmRfmHXxaLwG6eC1ZgIrVl66N/av+x3R8bTCHsU=
github.com/gregwebs/errcode v0.30.0/go.mod h1:+Yk7XHN3ra/h8ZNQu33ynSog3Vjn3MVR6HgRwEslgSM=
github.com/gregwebs/errors v1.40.1 h1:xL9Xh5kz95K/hWuieLQfluH501iVJWm57XgljZrs2yI=
github.com/gregwebs/errors v1.40.1/go.mod h1:uBv4YWGzx8CH5zX4yVeYx2qnFUl1Hog/5ESOgYXyAZQ=
github.com/gregwebs/errors/errwrap v0.1.1 h1:6tW81ugkhnAtoY81AS/OxwU5gu/5Ug/F9unLsWIzRU8=
github.com/gregwebs/errors/errwrap v0.1.1/go.mod h1:Xqoa1jjxE/0w8gjUTyRQEOXrG8d+sAwQmZEwnUyTtig=
github.com/gregwebs/errors/slogerr v0.1.1 h1:QES6SiI2MRNUCsWzxIweSdHQ6ep9iVv6FH/AEggzLrk=
github.com/gregwebs/errors/slogerr v0.1.1/go.mod h1:emBiGGVdfUO1UnPUCvgkN49Y2eL+EClImkMR+4Iq0rY=
github.com/gregwebs/stackfmt v0.1.1 h1:bqHZv69OGARsyNPD4tJfkJnu5oWjA86dISQKKfFt98A=
github.com/gregwebs/stackfmt v0.1.1/go.mod h1:MQWvus3s9juULflTEiFIllieKiz7AnX7i4HWyPOs2nQ=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
Expand Down
2 changes: 1 addition & 1 deletion goa/goa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestErrorResponse(t *testing.T) {
if err != nil {
t.Fatalf("expected json marshal success, got %v", err)
}
expectedJSON := `{"code":"internal","msg":"wrapped: goa test","data":{}}`
expectedJSON := `{"code":"internal","msg":"wrapped: goa test","data":null}`
if string(jsonBytes) != expectedJSON {
t.Fatalf("expected %s, got %s", expectedJSON, string(jsonBytes))
}
Expand Down
9 changes: 6 additions & 3 deletions grpc/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
module github.com/gregwebs/errcode/grpc

require (
github.com/gregwebs/errcode v0.11.0
github.com/gregwebs/errors v1.0.0
github.com/gregwebs/errcode v0.30.0
github.com/gregwebs/errors v1.40.1
google.golang.org/grpc v1.58.2
)

require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/gregwebs/errors/errwrap v0.1.1 // indirect
github.com/gregwebs/errors/slogerr v0.1.1 // indirect
github.com/gregwebs/stackfmt v0.1.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)

go 1.18
go 1.23.3
18 changes: 14 additions & 4 deletions grpc/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/gregwebs/errcode v0.11.0 h1:LryRBQg6BnqJhPPf5mDLEhLkYLx3mZyRE6Z5QT8djQI=
github.com/gregwebs/errcode v0.11.0/go.mod h1:9hGdc/kIviyBxF9dq0APXLfaDq2IpYg+Wt4kCbk0cQI=
github.com/gregwebs/errors v1.0.0 h1:Ov7HzBs79i7TcqQnfxyxLT8gttpTzGT3cDq70J8zkpE=
github.com/gregwebs/errors v1.0.0/go.mod h1:hUKQdGWTRTHMeAXJudXmN/BMLe+L51MG+OnRz72ZeBc=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/gregwebs/errcode v0.30.0 h1:1XylZmRfmHXxaLwG6eC1ZgIrVl66N/av+x3R8bTCHsU=
github.com/gregwebs/errcode v0.30.0/go.mod h1:+Yk7XHN3ra/h8ZNQu33ynSog3Vjn3MVR6HgRwEslgSM=
github.com/gregwebs/errors v1.40.1 h1:xL9Xh5kz95K/hWuieLQfluH501iVJWm57XgljZrs2yI=
github.com/gregwebs/errors v1.40.1/go.mod h1:uBv4YWGzx8CH5zX4yVeYx2qnFUl1Hog/5ESOgYXyAZQ=
github.com/gregwebs/errors/errwrap v0.1.1 h1:6tW81ugkhnAtoY81AS/OxwU5gu/5Ug/F9unLsWIzRU8=
github.com/gregwebs/errors/errwrap v0.1.1/go.mod h1:Xqoa1jjxE/0w8gjUTyRQEOXrG8d+sAwQmZEwnUyTtig=
github.com/gregwebs/errors/slogerr v0.1.1 h1:QES6SiI2MRNUCsWzxIweSdHQ6ep9iVv6FH/AEggzLrk=
github.com/gregwebs/errors/slogerr v0.1.1/go.mod h1:emBiGGVdfUO1UnPUCvgkN49Y2eL+EClImkMR+4Iq0rY=
github.com/gregwebs/stackfmt v0.1.1 h1:bqHZv69OGARsyNPD4tJfkJnu5oWjA86dISQKKfFt98A=
github.com/gregwebs/stackfmt v0.1.1/go.mod h1:MQWvus3s9juULflTEiFIllieKiz7AnX7i4HWyPOs2nQ=
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
Expand Down

0 comments on commit e4f8deb

Please sign in to comment.