Re-vendor the shared files from sneak/prompts at dd4027b (closes #52)
check / check (push) Waiting to run
check / check (push) Waiting to run
Takes .golangci.yml, .dockerignore, .gitignore, .editorconfig, the workflow and REPO_POLICIES.md from sneak/prompts dd4027b, keeping this repository's own entries after the shared content. Lint (golangci-lint v2.14.0) and test become Dockerfile phases that script/lint and script/test build alone and uncached; the image build depends on both, and script/cibuild bootstraps, runs script/check, then builds the image. The agent guidance file moves to AGENTS.md. The Go code is fixed for what the new configuration finds; reads that iterate rows now also report an iteration error. Model: opus-5-5
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user