Skip to content

Commit

Permalink
chore: upgrade golang and dependencies (#33)
Browse files Browse the repository at this point in the history
imp
  • Loading branch information
yk-eukarya authored Oct 18, 2023
1 parent 60331e2 commit 30170f2
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 431 deletions.
4 changes: 2 additions & 2 deletions account/accountdomain/workspace/member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestNewMembersWith(t *testing.T) {
m := NewMembersWith(map[UserID]Member{uid: {Role: RoleOwner}}, nil, true)
assert.Equal(t, &Members{
users: map[UserID]Member{uid: {Role: RoleOwner}},
integrations: map[IntegrationID]Member{},
integrations: nil,
fixed: true,
}, m)
}
Expand All @@ -29,7 +29,7 @@ func TestInitMembers(t *testing.T) {
m := InitMembers(uid)
assert.Equal(t, &Members{
users: map[UserID]Member{uid: {Role: RoleOwner, InvitedBy: uid}},
integrations: map[IntegrationID]Member{},
integrations: nil,
fixed: true,
}, m)
}
Expand Down
16 changes: 8 additions & 8 deletions account/accountinfrastructure/accountmemory/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewWorkspaceWith(workspaces ...*workspace.Workspace) *Workspace {
return r
}

func (r *Workspace) FindByUser(ctx context.Context, i accountdomain.UserID) (workspace.List, error) {
func (r *Workspace) FindByUser(_ context.Context, i accountdomain.UserID) (workspace.List, error) {
if r.err != nil {
return nil, r.err
}
Expand All @@ -50,19 +50,19 @@ func (r *Workspace) FindByIntegration(_ context.Context, i workspace.Integration
}), rerror.ErrNotFound)
}

func (r *Workspace) FindByIDs(ctx context.Context, ids workspace.IDList) (workspace.List, error) {
func (r *Workspace) FindByIDs(_ context.Context, ids workspace.IDList) (workspace.List, error) {
if r.err != nil {
return nil, r.err
}

res := r.data.FindAll(func(key workspace.ID, value *workspace.Workspace) bool {
return ids.Has(key)
})
slices.SortFunc(res, func(a, b *workspace.Workspace) bool { return a.ID().Compare(b.ID()) < 0 })
slices.SortFunc(res, func(a, b *workspace.Workspace) int { return a.ID().Compare(b.ID()) })
return res, nil
}

func (r *Workspace) FindByID(ctx context.Context, v workspace.ID) (*workspace.Workspace, error) {
func (r *Workspace) FindByID(_ context.Context, v workspace.ID) (*workspace.Workspace, error) {
if r.err != nil {
return nil, r.err
}
Expand All @@ -72,7 +72,7 @@ func (r *Workspace) FindByID(ctx context.Context, v workspace.ID) (*workspace.Wo
}), rerror.ErrNotFound)
}

func (r *Workspace) Save(ctx context.Context, t *workspace.Workspace) error {
func (r *Workspace) Save(_ context.Context, t *workspace.Workspace) error {
if r.err != nil {
return r.err
}
Expand All @@ -81,7 +81,7 @@ func (r *Workspace) Save(ctx context.Context, t *workspace.Workspace) error {
return nil
}

func (r *Workspace) SaveAll(ctx context.Context, workspaces workspace.List) error {
func (r *Workspace) SaveAll(_ context.Context, workspaces workspace.List) error {
if r.err != nil {
return r.err
}
Expand All @@ -92,7 +92,7 @@ func (r *Workspace) SaveAll(ctx context.Context, workspaces workspace.List) erro
return nil
}

func (r *Workspace) Remove(ctx context.Context, wid workspace.ID) error {
func (r *Workspace) Remove(_ context.Context, wid workspace.ID) error {
if r.err != nil {
return r.err
}
Expand All @@ -101,7 +101,7 @@ func (r *Workspace) Remove(ctx context.Context, wid workspace.ID) error {
return nil
}

func (r *Workspace) RemoveAll(ctx context.Context, ids workspace.IDList) error {
func (r *Workspace) RemoveAll(_ context.Context, ids workspace.IDList) error {
if r.err != nil {
return r.err
}
Expand Down
8 changes: 4 additions & 4 deletions account/accountusecase/accountinteractor/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ func TestWorkspace_AddMember(t *testing.T) {
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
u.ID(): {Role: workspace.RoleReader, InvitedBy: userID}, // added
}, map[accountdomain.IntegrationID]workspace.Member{}, false),
}, nil, false),
},
{
name: "add a non existing member",
Expand All @@ -572,7 +572,7 @@ func TestWorkspace_AddMember(t *testing.T) {
},
want: workspace.NewMembersWith(map[user.ID]workspace.Member{
userID: {Role: workspace.RoleOwner},
}, map[accountdomain.IntegrationID]workspace.Member{}, false),
}, nil, false),
},
{
name: "add a mamber to personal workspace",
Expand Down Expand Up @@ -845,7 +845,7 @@ func TestWorkspace_RemoveMember(t *testing.T) {
operator: op,
},
wantErr: nil,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{userID: {Role: workspace.RoleOwner}}, map[accountdomain.IntegrationID]workspace.Member{}, false),
want: workspace.NewMembersWith(map[user.ID]workspace.Member{userID: {Role: workspace.RoleOwner}}, nil, false),
},
{
name: "Remove personal workspace",
Expand Down Expand Up @@ -994,7 +994,7 @@ func TestWorkspace_UpdateMember(t *testing.T) {
operator: op,
},
wantErr: nil,
want: workspace.NewMembersWith(map[user.ID]workspace.Member{userID: {Role: workspace.RoleOwner}, u.ID(): {Role: workspace.RoleWriter}}, map[accountdomain.IntegrationID]workspace.Member{}, false),
want: workspace.NewMembersWith(map[user.ID]workspace.Member{userID: {Role: workspace.RoleOwner}, u.ID(): {Role: workspace.RoleWriter}}, nil, false),
},
{
name: "Update personal workspace",
Expand Down
148 changes: 77 additions & 71 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,121 +1,127 @@
module github.com/reearth/reearthx

go 1.20
go 1.21

require (
github.com/99designs/gqlgen v0.17.12
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.3
github.com/Khan/genqlient v0.5.0
github.com/99designs/gqlgen v0.17.39
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.20.0
github.com/Khan/genqlient v0.6.0
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/auth0/go-jwt-middleware/v2 v2.0.1
github.com/aws/aws-sdk-go-v2 v1.18.0
github.com/aws/aws-sdk-go-v2/config v1.18.25
github.com/aws/aws-sdk-go-v2/service/ses v1.15.9
github.com/goccy/go-yaml v1.9.8
github.com/auth0/go-jwt-middleware/v2 v2.1.0
github.com/aws/aws-sdk-go-v2 v1.21.2
github.com/aws/aws-sdk-go-v2/config v1.19.0
github.com/aws/aws-sdk-go-v2/service/ses v1.16.10
github.com/goccy/go-yaml v1.11.2
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f
github.com/google/uuid v1.3.0
github.com/google/uuid v1.3.1
github.com/gorilla/mux v1.8.0
github.com/iancoleman/strcase v0.2.0
github.com/jarcoal/httpmock v1.2.0
github.com/iancoleman/strcase v0.3.0
github.com/jarcoal/httpmock v1.3.1
github.com/jpillora/opts v1.2.3
github.com/labstack/echo/v4 v4.7.2
github.com/labstack/gommon v0.3.1
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
github.com/maruel/panicparse/v2 v2.3.1
github.com/nicksnyder/go-i18n/v2 v2.2.1
github.com/oklog/ulid v1.3.1
github.com/pkg/errors v0.9.1
github.com/ravilushqa/otelgqlgen v0.8.0
github.com/samber/lo v1.27.0
github.com/sendgrid/sendgrid-go v3.12.0+incompatible
github.com/spf13/afero v1.9.3
github.com/stretchr/testify v1.8.0
github.com/ravilushqa/otelgqlgen v0.13.1
github.com/samber/lo v1.38.1
github.com/sendgrid/sendgrid-go v3.13.0+incompatible
github.com/spf13/afero v1.10.0
github.com/stretchr/testify v1.8.4
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/uber/jaeger-lib v2.4.1+incompatible
github.com/vektah/gqlparser/v2 v2.4.6
github.com/zitadel/oidc v1.5.1
go.mongodb.org/mongo-driver v1.10.1
go.opentelemetry.io/otel v1.7.0
go.opentelemetry.io/otel/sdk v1.7.0
go.uber.org/atomic v1.9.0
go.uber.org/zap v1.21.0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
golang.org/x/exp v0.0.0-20220706164943-b4a6d9510983
golang.org/x/text v0.4.0
github.com/vektah/gqlparser/v2 v2.5.10
github.com/zitadel/oidc v1.13.5
go.mongodb.org/mongo-driver v1.12.1
go.opentelemetry.io/otel v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.14.0
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/text v0.13.0
gopkg.in/square/go-jose.v2 v2.6.0
)

require (
cloud.google.com/go/compute v1.6.1 // indirect
cloud.google.com/go/trace v1.2.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.3 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/trace v1.10.1 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.44.0 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/alexflint/go-arg v1.4.2 // indirect
github.com/alexflint/go-scalar v1.0.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect
github.com/aws/smithy-go v1.15.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/trifles v0.0.0-20200705224438-cafc02a1ee2b // indirect
github.com/fatih/color v1.12.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/gorilla/schema v1.2.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.2-0.20190308074557-af07aa5181b3 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/sendgrid/rest v2.6.9+incompatible // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tidwall/pretty v1.0.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sosodev/duration v1.1.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
github.com/zitadel/logging v0.3.3 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/contrib v1.7.0 // indirect
go.opentelemetry.io/otel/trace v1.7.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/tools v0.1.12 // indirect
github.com/zitadel/logging v0.3.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib v1.16.1 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
google.golang.org/api v0.80.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335 // indirect
google.golang.org/grpc v1.46.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230731193218-e0aa005b6bdf // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 30170f2

Please sign in to comment.