Enable 'makezero' and 'prealloc' linters, and require 'any' instead of 'interface{}'

Enforce importas:

- go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1
- go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1
This commit is contained in:
Joshua Casey
2024-05-11 22:44:42 -05:00
parent bbe10004b4
commit f5116cddb4
98 changed files with 1889 additions and 1869 deletions

View File

@@ -94,7 +94,7 @@ func TestEntrypoint(t *testing.T) {
var logBuf bytes.Buffer
testLog := log.New(&logBuf, "", 0)
exited := "exiting via fatal"
fail = func(format string, v ...interface{}) {
fail = func(format string, v ...any) {
testLog.Printf(format, v...)
panic(exited)
}

View File

@@ -42,7 +42,7 @@ func TestEntrypoint(t *testing.T) {
var logBuf bytes.Buffer
testLog := log.New(&logBuf, "", 0)
exited := "exiting via fatal"
fail = func(err error, keysAndValues ...interface{}) {
fail = func(err error, keysAndValues ...any) {
testLog.Print(err)
if len(keysAndValues) > 0 {
testLog.Print(keysAndValues...)