all repos — searchix @ e766c8d6e4434b303246522ad29c4bc328de56ba

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: address linter issues

Alan Pearce
commit

e766c8d6e4434b303246522ad29c4bc328de56ba

parent

a34ba86c2c899bbf2902c4c99b817a9692c3294f

1 file changed, 6 insertions(+), 6 deletions(-)

changed files
M internal/importer/package.gointernal/importer/package.go
@@ -159,23 +159,23 @@
continue } kv := mv.Value.(jstream.KV) - x := kv.Value.(map[string]interface{}) + x := kv.Value.(map[string]any) - meta := x["meta"].(map[string]interface{}) + meta := x["meta"].(map[string]any) var licenses []nix.License if meta["license"] != nil { switch v := reflect.ValueOf(meta["license"]); v.Kind() { case reflect.Map: - licenses = append(licenses, *convertToLicense(v.Interface().(map[string]interface{}))) + licenses = append(licenses, *convertToLicense(v.Interface().(map[string]any))) case reflect.Array, reflect.Slice: licenses = make([]nix.License, v.Len()) - for i, v := range v.Interface().([]interface{}) { + for i, v := range v.Interface().([]any) { switch v := reflect.ValueOf(v); v.Kind() { case reflect.String: licenses[i] = makeAdhocLicense(v.String()) case reflect.Map: - licenses[i] = *convertToLicense(v.Interface().(map[string]interface{})) + licenses[i] = *convertToLicense(v.Interface().(map[string]any)) default: errs <- fault.Newf( "don't know how to handle sublicense of type %s: %v",
@@ -199,7 +199,7 @@
if meta["platforms"] != nil { plats := make([]any, len(meta["platforms"].([]any))) i := 0 - for _, plat := range meta["platforms"].([]interface{}) { + for _, plat := range meta["platforms"].([]any) { switch v := reflect.ValueOf(plat); v.Kind() { case reflect.String: plats[i] = v.String()