Skip to content

Commit

Permalink
Merge branch 'main' into fix-config-overwrites
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeansen committed Jul 5, 2023
2 parents afc374f + cac9c75 commit 4843e09
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
- name: unshallow
run: git fetch --prune --unshallow
- name: setup-go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: capture current date
id: date
run: echo "::set-output name=date::$(date -u '+%Y-%m-%d-%H:%M:%S-%Z')"
- name: goreleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
Expand Down
2 changes: 1 addition & 1 deletion cmd/proxy/actions/app_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ type athensLoggerForRedis struct {
logger *log.Logger
}

func (l *athensLoggerForRedis) Printf(ctx context.Context, format string, v ...interface{}) {
func (l *athensLoggerForRedis) Printf(ctx context.Context, format string, v ...any) {
l.logger.WithContext(ctx).Printf(format, v...)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func testConfigFile(t *testing.T) (testConfigFile string) {
return testConfigFile
}

func compareConfigs(parsedConf *Config, expConf *Config, t *testing.T, ignoreTypes ...interface{}) {
func compareConfigs(parsedConf *Config, expConf *Config, t *testing.T, ignoreTypes ...any) {
t.Helper()
opts := cmpopts.IgnoreTypes(append([]interface{}{Index{}}, ignoreTypes...)...)
opts := cmpopts.IgnoreTypes(append([]any{Index{}}, ignoreTypes...)...)
eq := cmp.Equal(parsedConf, expConf, opts)
if !eq {
diff := cmp.Diff(parsedConf, expConf, opts)
Expand Down
2 changes: 1 addition & 1 deletion pkg/errors/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// the logger's SystemError method, although it accepts any type of error,
// it knows how to deal with errors constructed from this package in a debuggable way.
// To construct an Athens error, call the errors.E function. The E function takes
// an Op and a variadic interface{}, but the values of the Error struct are what you can
// an Op and a variadic of any, but the values of the Error struct are what you can
// pass to it. Values such as the error Kind, Module, Version, Error Message,
// and Seveirty (seriousness of an error) are all optional. The only truly required value is
// the errors.Op so you can construct a traceable stack that leads to where
Expand Down
2 changes: 1 addition & 1 deletion pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type V string
// an error or a string to describe what exactly went wrong.
// You can optionally pass a Logrus severity to indicate
// the log level of an error based on the context it was constructed in.
func E(op Op, args ...interface{}) error {
func E(op Op, args ...any) error {
e := Error{Op: op}
if len(args) == 0 {
msg := "errors.E called with 0 args"
Expand Down
12 changes: 6 additions & 6 deletions pkg/log/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
// Fields are being overwritten.
type Entry interface {
// Basic Logging Operation
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Debugf(format string, args ...any)
Infof(format string, args ...any)
Warnf(format string, args ...any)
Errorf(format string, args ...any)

// Attach contextual information to the logging entry
WithFields(fields map[string]interface{}) Entry
WithFields(fields map[string]any) Entry

// SystemErr is a method that disects the error
// and logs the appropriate level and fields for it.
Expand All @@ -29,7 +29,7 @@ type entry struct {
*logrus.Entry
}

func (e *entry) WithFields(fields map[string]interface{}) Entry {
func (e *entry) WithFields(fields map[string]any) Entry {
ent := e.Entry.WithFields(fields)
return &entry{ent}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/log/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const lightGrey = 0xffccc

func (devFormatter) Format(e *logrus.Entry) ([]byte, error) {
var buf bytes.Buffer
var sprintf func(format string, a ...interface{}) string
var sprintf func(format string, a ...any) string
switch e.Level {
case logrus.DebugLevel:
sprintf = color.New(lightGrey).Sprintf
Expand Down
2 changes: 1 addition & 1 deletion pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (l *Logger) SystemErr(err error) {
}

// WithFields Entry implementation.
func (l *Logger) WithFields(fields map[string]interface{}) Entry {
func (l *Logger) WithFields(fields map[string]any) Entry {
e := l.Logger.WithFields(fields)

return &entry{e}
Expand Down
2 changes: 1 addition & 1 deletion pkg/stash/with_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// RedisLogger mirrors github.com/go-redis/redis/v8/internal.Logging.
type RedisLogger interface {
Printf(ctx context.Context, format string, v ...interface{})
Printf(ctx context.Context, format string, v ...any)
}

// WithRedisLock returns a distributed singleflight
Expand Down
2 changes: 1 addition & 1 deletion pkg/stash/with_redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type testingRedisLogger struct {
t *testing.T
}

func (l *testingRedisLogger) Printf(ctx context.Context, format string, v ...interface{}) {
func (l *testingRedisLogger) Printf(ctx context.Context, format string, v ...any) {
l.t.Logf(format, v...)
}

Expand Down

0 comments on commit 4843e09

Please sign in to comment.