diff --git a/server/embed/config.go b/server/embed/config.go index 3a382056834..2ea9e7dc179 100644 --- a/server/embed/config.go +++ b/server/embed/config.go @@ -832,7 +832,7 @@ func (cfg *configYAML) configFromFile(path string) error { } // parses the yaml bytes to raw map first, then getBoolFlagVal can get the top level bool flag value. - var cfgMap map[string]interface{} + var cfgMap map[string]any err = yaml.Unmarshal(b, &cfgMap) if err != nil { return err diff --git a/server/storage/wal/wal_test.go b/server/storage/wal/wal_test.go index a9e6dc84910..b7bebfb410f 100644 --- a/server/storage/wal/wal_test.go +++ b/server/storage/wal/wal_test.go @@ -97,7 +97,7 @@ func TestNew(t *testing.T) { func TestCreateNewWALFile(t *testing.T) { tests := []struct { name string - fileType interface{} + fileType any forceNew bool }{ { @@ -130,7 +130,7 @@ func TestCreateNewWALFile(t *testing.T) { err := os.WriteFile(p, []byte("test data"), fileutil.PrivateFileMode) require.NoError(t, err) - var f interface{} + var f any switch tt.fileType.(type) { case *os.File: f, err = createNewWALFile[*os.File](p, tt.forceNew) diff --git a/tools/.golangci.yaml b/tools/.golangci.yaml index 3ea8ab82302..1ac4e4c68c2 100644 --- a/tools/.golangci.yaml +++ b/tools/.golangci.yaml @@ -55,6 +55,9 @@ linters-settings: # please keep this alphabetized - name: context-as-argument severity: error disabled: false + - name: context-keys-type + severity: error + disabled: false - name: dot-imports severity: error disabled: false @@ -64,13 +67,19 @@ linters-settings: # please keep this alphabetized - name: error-naming severity: error disabled: false + - name: error-strings + severity: error + disabled: false + - name: errorf + severity: error + disabled: false - name: if-return severity: error disabled: false - name: increment-decrement severity: error disabled: false - - name: var-declaration + - name: indent-error-flow severity: error disabled: false - name: package-comments @@ -85,16 +94,10 @@ linters-settings: # please keep this alphabetized - name: time-naming severity: error disabled: false - - name: indent-error-flow - severity: error - disabled: false - - name: errorf - severity: error - disabled: false - - name: context-keys-type + - name: use-any severity: error disabled: false - - name: error-strings + - name: var-declaration severity: error disabled: false - name: var-naming