Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
fix: fix lints, remove tests for now due to restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Mar 10, 2024
1 parent 9cab872 commit 4e2f802
Show file tree
Hide file tree
Showing 8 changed files with 1,669 additions and 1,789 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mockgen:
go install github.com/golang/mock/mockgen@v1.6.0
mockgen -source=internal/repository/public.go -destination=internal/repository/public_mock.gen.go -package=repository
mockgen -source=internal/kafka/writer/writer.go -destination=internal/kafka/writer/riter.gen.go -package=kafka
#mockgen:
# go install github.com/golang/mock/mockgen@v1.6.0
# mockgen -source=internal/repository/public.go -destination=internal/repository/public_mock.gen.go -package=repository
# mockgen -source=internal/kafka/writer/writer.go -destination=internal/kafka/writer/riter.gen.go -package=kafka

lint:
golangci-lint run
Expand All @@ -11,6 +11,6 @@ test:

pre-commit:
go mod tidy
make mockgen
#make mockgen
make lint
make test
25 changes: 0 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/golang/mock v1.6.0
github.com/google/uuid v1.5.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/ory/dockertest/v3 v3.10.0
github.com/segmentio/kafka-go v0.4.46
github.com/spf13/viper v1.18.1
github.com/stretchr/testify v1.8.4
Expand All @@ -19,38 +18,20 @@ require (
)

require (
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v23.0.1+incompatible // indirect
github.com/docker/docker v23.0.3+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/montanaflynn/stats v0.7.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
Expand All @@ -59,22 +40,16 @@ require (
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.uber.org/goleak v1.2.1 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
100 changes: 0 additions & 100 deletions go.sum

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions internal/app/event/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (h *handler) run(ctx context.Context, wg *sync.WaitGroup) {
return
case <-ticker.C:
h.runDisplayEvent(ctx)
h.runStartEvent(ctx)
}
}
}()
Expand Down Expand Up @@ -96,9 +97,10 @@ func (h *handler) runStartEvent(ctx context.Context) {
return
}
}
} else { // todo create a party as they are not online

}
//else { // todo create a party as they are not online
//
//}

// We now have a party that is open with only the owner of the event in it.

Expand Down
4 changes: 2 additions & 2 deletions internal/grpc/party.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ var (
WithDetails(&pb.KickPlayerErrorResponse{ErrorType: pb.KickPlayerErrorResponse_SELF_NOT_LEADER})).Err()

// todo this error is no longer used. was stupid it existed in the first place oopsies
kickTargetIsLeaderErr = panicIfErr(status.New(codes.FailedPrecondition, "target is the leader of the party").
WithDetails(&pb.KickPlayerErrorResponse{ErrorType: pb.KickPlayerErrorResponse_TARGET_IS_LEADER})).Err()
//kickTargetIsLeaderErr = panicIfErr(status.New(codes.FailedPrecondition, "target is the leader of the party").
// WithDetails(&pb.KickPlayerErrorResponse{ErrorType: pb.KickPlayerErrorResponse_TARGET_IS_LEADER})).Err()

kickTargetNotInPartyErr = panicIfErr(status.New(codes.FailedPrecondition, "target is not in the party").
WithDetails(&pb.KickPlayerErrorResponse{ErrorType: pb.KickPlayerErrorResponse_TARGET_NOT_IN_PARTY})).Err()
Expand Down
Loading

0 comments on commit 4e2f802

Please sign in to comment.