chore: Fix golangci-lint 2.12.1 findings (#7690)

This commit is contained in:
Zen Dodd 2026-05-07 17:40:26 +10:00 committed by GitHub
parent c7c9f3108a
commit d2172bea61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 31 additions and 16 deletions

View file

@ -234,7 +234,7 @@ func getModules() (standard, nonstandard, unknown []moduleInfo, err error) {
// not sure why), and since New() should return a pointer
// value, we need to dereference it first
iface := any(modInfo.New())
if rv := reflect.ValueOf(iface); rv.Kind() == reflect.Ptr {
if rv := reflect.ValueOf(iface); rv.Kind() == reflect.Pointer {
iface = reflect.New(reflect.TypeOf(iface).Elem()).Elem().Interface()
}
modPkgPath := reflect.TypeOf(iface).PkgPath()