Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ issues:
text: "^comment-spacings: no space between comment delimiter and comment text"
source: "//(cspell:|nolint:|sys |todo)"

# not on go 1.18 yet, so no any
- linters:
- revive
text: "^use-any: since GO 1.18 'interface{}' can be replaced by 'any'"

# allow unjustified ignores of error checks in defer statements
- linters:
- nolintlint
Expand Down
2 changes: 1 addition & 1 deletion internal/stringbuffer/wstring.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const MinWStringCap = 310
// is copied to heap and then referenced via pointer in the interface header that sync.Pool
// stores.
var pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly
New: func() interface{} {
New: func() any {
b := make([]uint16, MinWStringCap)
return &b
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/etw/fieldopt.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ func Time(name string, value time.Time) FieldOpt {
// type. The intent of this is to make it easier to see which types are not
// supported in traces, so we can evaluate adding support for more types in the
// future.
func SmartField(name string, v interface{}) FieldOpt {
func SmartField(name string, v any) FieldOpt {
switch v := v.(type) {
case bool:
return BoolField(name, v)
Expand Down
2 changes: 1 addition & 1 deletion pkg/etwlogrus/hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/sirupsen/logrus"
)

func fireEvent(name string, value interface{}) {
func fireEvent(name string, value any) {
logrus.WithField("Field", value).Info(name)
}

Expand Down