WIP: lint fixes in the smaller packages

Model: opus-5-5
This commit is contained in:
2026-10-14 13:03:14 +00:00
parent 7de2066bf2
commit c9fb637ecd
15 changed files with 593 additions and 359 deletions
+4 -2
View File
@@ -1,4 +1,3 @@
// Package asinfo provides information about Autonomous Systems (AS)
package asinfo
import (
@@ -54,7 +53,9 @@ func initRegistry() {
}
var asInfos []Info
if err := json.Unmarshal(jsonData, &asInfos); err != nil {
err = json.Unmarshal(jsonData, &asInfos)
if err != nil {
panic("failed to unmarshal embedded AS data: " + err.Error())
}
@@ -137,6 +138,7 @@ func Search(query string) []Info {
defer defaultRegistry.mu.RUnlock()
var results []Info
for _, info := range defaultRegistry.byASN {
if contains(info.Handle, query) || contains(info.Description, query) {
results = append(results, *info)