Skip to content

Commit 253ee77

Browse files
author
Antoine Gelloz
authored
Merge pull request #7 from numary/chore/models-in-sharedpublishkafka
chore: bump dependencies
2 parents d9684b9 + b95cf9e commit 253ee77

File tree

15 files changed

+545
-170
lines changed

15 files changed

+545
-170
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
- package-ecosystem: "gomod"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

go.mod

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,63 @@ module github.com/numary/go-libs
33
go 1.18
44

55
require (
6-
github.com/Shopify/sarama v1.32.0
6+
github.com/Shopify/sarama v1.36.0
77
github.com/ThreeDotsLabs/watermill v1.1.1
88
github.com/ThreeDotsLabs/watermill-http v1.1.4
9-
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.2.1
9+
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.2.2
1010
github.com/dgraph-io/ristretto v0.1.0
1111
github.com/golang-jwt/jwt v3.2.2+incompatible
12-
github.com/pborman/uuid v1.2.1
12+
github.com/google/uuid v1.3.0
1313
github.com/pkg/errors v0.9.1
14-
github.com/sirupsen/logrus v1.8.1
15-
github.com/stretchr/testify v1.7.0
16-
github.com/xdg-go/scram v1.1.0
17-
go.uber.org/fx v1.17.1
14+
github.com/sirupsen/logrus v1.9.0
15+
github.com/stretchr/testify v1.8.0
16+
github.com/xdg-go/scram v1.1.1
17+
go.uber.org/fx v1.18.1
1818
)
1919

2020
require (
21+
github.com/ajg/form v1.5.1 // indirect
2122
github.com/cespare/xxhash/v2 v2.1.2 // indirect
2223
github.com/davecgh/go-spew v1.1.1 // indirect
2324
github.com/dustin/go-humanize v1.0.0 // indirect
24-
github.com/eapache/go-resiliency v1.2.0 // indirect
25+
github.com/eapache/go-resiliency v1.3.0 // indirect
2526
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
2627
github.com/eapache/queue v1.1.0 // indirect
27-
github.com/go-chi/chi v4.0.2+incompatible // indirect
28-
github.com/go-chi/render v1.0.1 // indirect
29-
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
28+
github.com/go-chi/chi v4.1.2+incompatible // indirect
29+
github.com/go-chi/render v1.0.2 // indirect
30+
github.com/go-logr/logr v1.2.3 // indirect
31+
github.com/go-logr/stdr v1.2.2 // indirect
32+
github.com/golang/glog v1.0.0 // indirect
3033
github.com/golang/snappy v0.0.4 // indirect
31-
github.com/google/uuid v1.1.2 // indirect
32-
github.com/hashicorp/errwrap v1.0.0 // indirect
33-
github.com/hashicorp/go-multierror v1.1.0 // indirect
34-
github.com/hashicorp/go-uuid v1.0.2 // indirect
34+
github.com/hashicorp/errwrap v1.1.0 // indirect
35+
github.com/hashicorp/go-multierror v1.1.1 // indirect
36+
github.com/hashicorp/go-uuid v1.0.3 // indirect
3537
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
3638
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
37-
github.com/jcmturner/gofork v1.0.0 // indirect
38-
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
39+
github.com/jcmturner/gofork v1.7.6 // indirect
40+
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
3941
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
40-
github.com/klauspost/compress v1.14.4 // indirect
41-
github.com/lithammer/shortuuid/v3 v3.0.4 // indirect
42+
github.com/klauspost/compress v1.15.9 // indirect
43+
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
4244
github.com/oklog/ulid v1.3.1 // indirect
43-
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
45+
github.com/pierrec/lz4/v4 v4.1.15 // indirect
4446
github.com/pmezard/go-difflib v1.0.0 // indirect
4547
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
4648
github.com/rogpeppe/go-internal v1.8.0 // indirect
4749
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
4850
github.com/xdg-go/stringprep v1.0.3 // indirect
49-
go.uber.org/atomic v1.9.0 // indirect
50-
go.uber.org/dig v1.14.1 // indirect
51+
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.34.0 // indirect
52+
go.opentelemetry.io/otel v1.9.0 // indirect
53+
go.opentelemetry.io/otel/trace v1.9.0 // indirect
54+
go.uber.org/atomic v1.10.0 // indirect
55+
go.uber.org/dig v1.15.0 // indirect
5156
go.uber.org/goleak v1.1.12 // indirect
5257
go.uber.org/multierr v1.8.0 // indirect
53-
go.uber.org/zap v1.21.0 // indirect
54-
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
55-
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
56-
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
58+
go.uber.org/zap v1.23.0 // indirect
59+
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 // indirect
60+
golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c // indirect
61+
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect
62+
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 // indirect
5763
golang.org/x/text v0.3.7 // indirect
58-
gopkg.in/yaml.v2 v2.4.0 // indirect
59-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
64+
gopkg.in/yaml.v3 v3.0.1 // indirect
6065
)

go.sum

Lines changed: 448 additions & 89 deletions
Large diffs are not rendered by default.

sharedauth/bearer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (v *introspectionValidator) Validate(ctx context.Context, token string) err
8282
if !v.audienceValidator.Validate(ctx, aud) {
8383
return errors.New("audience mismatch")
8484
}
85-
case []interface{}:
85+
case []any:
8686
match := false
8787
for _, aud := range aud {
8888
if v.audienceValidator.Validate(ctx, aud.(string)) {

sharedauth/middleware.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func Middleware(methods ...Method) func(handler http.Handler) http.Handler {
1414
if m.IsMatching(r) {
1515
agent, err := m.Check(r)
1616
if err != nil {
17-
sharedlogging.GetLogger(r.Context()).WithFields(map[string]interface{}{
17+
sharedlogging.GetLogger(r.Context()).WithFields(map[string]any{
1818
"err": err,
1919
}).Infof("Access denied")
2020
w.WriteHeader(http.StatusForbidden)

sharedhealth/pkg/controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import (
1717
func TestHealthController(t *testing.T) {
1818
type testCase struct {
1919
name string
20-
healthChecksProvider []interface{}
20+
healthChecksProvider []any
2121
expectedStatus int
2222
expectedResult map[string]string
2323
}
2424

2525
var tests = []testCase{
2626
{
2727
name: "all-ok",
28-
healthChecksProvider: []interface{}{
28+
healthChecksProvider: []any{
2929
func() sharedhealth.NamedCheck {
3030
return sharedhealth.NewNamedCheck("test1", sharedhealth.CheckFn(func(ctx context.Context) error {
3131
return nil
@@ -45,7 +45,7 @@ func TestHealthController(t *testing.T) {
4545
},
4646
{
4747
name: "one-failing",
48-
healthChecksProvider: []interface{}{
48+
healthChecksProvider: []any{
4949
func() sharedhealth.NamedCheck {
5050
return sharedhealth.NewNamedCheck("test1", sharedhealth.CheckFn(func(ctx context.Context) error {
5151
return nil

sharedhealth/pkg/module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "go.uber.org/fx"
44

55
const HealthCheckKey = `group:"_healthCheck"`
66

7-
func ProvideHealthCheck(provider interface{}) fx.Option {
7+
func ProvideHealthCheck(provider any) fx.Option {
88
return fx.Provide(
99
fx.Annotate(provider, fx.ResultTags(HealthCheckKey)),
1010
)

sharedlogging/logging.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package sharedlogging
33
import "context"
44

55
type Logger interface {
6-
Debugf(fmt string, args ...interface{})
7-
Infof(fmt string, args ...interface{})
8-
Errorf(fmt string, args ...interface{})
9-
Debug(args ...interface{})
10-
Info(args ...interface{})
11-
Error(args ...interface{})
12-
WithFields(map[string]interface{}) Logger
6+
Debugf(fmt string, args ...any)
7+
Infof(fmt string, args ...any)
8+
Errorf(fmt string, args ...any)
9+
Debug(args ...any)
10+
Info(args ...any)
11+
Error(args ...any)
12+
WithFields(map[string]any) Logger
1313
WithContext(ctx context.Context) Logger
1414
}
1515

@@ -34,13 +34,13 @@ func (n noOpLogger) WithContext(ctx context.Context) Logger {
3434
return n
3535
}
3636

37-
func (n noOpLogger) Debug(args ...interface{}) {}
38-
func (n noOpLogger) Info(args ...interface{}) {}
39-
func (n noOpLogger) Error(args ...interface{}) {}
40-
func (n noOpLogger) Debugf(fmt string, args ...interface{}) {}
41-
func (n noOpLogger) Infof(fmt string, args ...interface{}) {}
42-
func (n noOpLogger) Errorf(fmt string, args ...interface{}) {}
43-
func (n noOpLogger) WithFields(m map[string]interface{}) Logger {
37+
func (n noOpLogger) Debug(args ...any) {}
38+
func (n noOpLogger) Info(args ...any) {}
39+
func (n noOpLogger) Error(args ...any) {}
40+
func (n noOpLogger) Debugf(fmt string, args ...any) {}
41+
func (n noOpLogger) Infof(fmt string, args ...any) {}
42+
func (n noOpLogger) Errorf(fmt string, args ...any) {}
43+
func (n noOpLogger) WithFields(m map[string]any) Logger {
4444
return n
4545
}
4646

@@ -63,24 +63,24 @@ func GetLogger(ctx context.Context) Logger {
6363
return loggerFactory.Get(ctx)
6464
}
6565

66-
func Debugf(fmt string, args ...interface{}) {
66+
func Debugf(fmt string, args ...any) {
6767
GetLogger(context.Background()).Debugf(fmt, args...)
6868
}
69-
func Infof(fmt string, args ...interface{}) {
69+
func Infof(fmt string, args ...any) {
7070
GetLogger(context.Background()).Infof(fmt, args...)
7171
}
72-
func Errorf(fmt string, args ...interface{}) {
72+
func Errorf(fmt string, args ...any) {
7373
GetLogger(context.Background()).Errorf(fmt, args...)
7474
}
75-
func Debug(args ...interface{}) {
75+
func Debug(args ...any) {
7676
GetLogger(context.Background()).Debug(args...)
7777
}
78-
func Info(args ...interface{}) {
78+
func Info(args ...any) {
7979
GetLogger(context.Background()).Info(args...)
8080
}
81-
func Error(args ...interface{}) {
81+
func Error(args ...any) {
8282
GetLogger(context.Background()).Error(args...)
8383
}
84-
func WithFields(v map[string]interface{}) Logger {
84+
func WithFields(v map[string]any) Logger {
8585
return GetLogger(context.Background()).WithFields(v)
8686
}

sharedlogging/sharedlogginglogrus/logrus.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99

1010
type logrusLogger struct {
1111
entry interface {
12-
Debugf(format string, args ...interface{})
13-
Debug(args ...interface{})
14-
Infof(format string, args ...interface{})
15-
Info(args ...interface{})
16-
Errorf(format string, args ...interface{})
17-
Error(args ...interface{})
12+
Debugf(format string, args ...any)
13+
Debug(args ...any)
14+
Infof(format string, args ...any)
15+
Info(args ...any)
16+
Errorf(format string, args ...any)
17+
Error(args ...any)
1818
WithFields(fields logrus.Fields) *logrus.Entry
1919
WithContext(ctx context.Context) *logrus.Entry
2020
}
@@ -26,25 +26,25 @@ func (l *logrusLogger) WithContext(ctx context.Context) sharedlogging.Logger {
2626
}
2727
}
2828

29-
func (l *logrusLogger) Debug(args ...interface{}) {
29+
func (l *logrusLogger) Debug(args ...any) {
3030
l.entry.Debug(args...)
3131
}
32-
func (l *logrusLogger) Debugf(fmt string, args ...interface{}) {
32+
func (l *logrusLogger) Debugf(fmt string, args ...any) {
3333
l.entry.Debugf(fmt, args...)
3434
}
35-
func (l *logrusLogger) Infof(fmt string, args ...interface{}) {
35+
func (l *logrusLogger) Infof(fmt string, args ...any) {
3636
l.entry.Infof(fmt, args...)
3737
}
38-
func (l *logrusLogger) Info(args ...interface{}) {
38+
func (l *logrusLogger) Info(args ...any) {
3939
l.entry.Info(args...)
4040
}
41-
func (l *logrusLogger) Errorf(fmt string, args ...interface{}) {
41+
func (l *logrusLogger) Errorf(fmt string, args ...any) {
4242
l.entry.Errorf(fmt, args...)
4343
}
44-
func (l *logrusLogger) Error(args ...interface{}) {
44+
func (l *logrusLogger) Error(args ...any) {
4545
l.entry.Error(args...)
4646
}
47-
func (l *logrusLogger) WithFields(fields map[string]interface{}) sharedlogging.Logger {
47+
func (l *logrusLogger) WithFields(fields map[string]any) sharedlogging.Logger {
4848
return &logrusLogger{
4949
entry: l.entry.WithFields(fields),
5050
}

sharedotlp/pkg/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func RecordError(ctx context.Context, e error) {
1717
span.RecordError(e, trace.WithStackTrace(true))
1818
}
1919

20-
func RecordAsError(ctx context.Context, e interface{}) {
20+
func RecordAsError(ctx context.Context, e any) {
2121
if e == nil {
2222
return
2323
}

0 commit comments

Comments
 (0)