fix: format code for linter

This commit is contained in:
keithy 2026-03-08 01:28:31 +00:00 committed by Keith Patrick
parent 9796051136
commit dd3b91408c
4 changed files with 24 additions and 23 deletions

1
.gitignore vendored
View file

@ -50,4 +50,3 @@ dist/
# Windows Application Icon/Resource
*.syso
mise/

View file

@ -38,14 +38,14 @@ func TestInstallCommandArgs(t *testing.T) {
{
name: "no registry with one arg passes",
registry: "",
args: []string{"sioeed/picoclaw-skills/weather"},
args: []string{"sipeed/picoclaw-skills/weather"},
wantErr: false,
},
{
name: "no registry with no args fails",
registry: "",
args: []string{},
wantErr: true,
name: "no registry with no args fails",
registry: "",
args: []string{},
wantErr: true,
errContains: "exactly 1 argument",
},
{

View file

@ -393,7 +393,6 @@
},
"symlink_local": true
}
}
},
"max_concurrent_searches": 2,
"search_cache": {

View file

@ -11,10 +11,10 @@ import (
func TestIndexRegistryMapURL(t *testing.T) {
tests := []struct {
name string
mappings map[string]string
inputURL string
expectedURL string
name string
mappings map[string]string
inputURL string
expectedURL string
}{
{
name: "maps HTTP to fork",
@ -41,16 +41,16 @@ func TestIndexRegistryMapURL(t *testing.T) {
expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
},
{
name: "empty mappings returns original",
mappings: map[string]string{},
inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
name: "empty mappings returns original",
mappings: map[string]string{},
inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
},
{
name: "nil mappings returns original",
mappings: nil,
inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
name: "nil mappings returns original",
mappings: nil,
inputURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
expectedURL: "https://raw.githubusercontent.com/keithy/angelhub/main/skills",
},
{
name: "first matching prefix wins",
@ -106,10 +106,13 @@ func TestIndexRegistryIsURLAllowed(t *testing.T) {
expected: true,
},
{
name: "multiple prefixes first match wins",
allowedPrefixes: []string{"https://raw.githubusercontent.com/other/", "https://raw.githubusercontent.com/keithy/"},
url: "https://raw.githubusercontent.com/keithy/angelhub/main",
expected: true,
name: "multiple prefixes first match wins",
allowedPrefixes: []string{
"https://raw.githubusercontent.com/other/",
"https://raw.githubusercontent.com/keithy/",
},
url: "https://raw.githubusercontent.com/keithy/angelhub/main",
expected: true,
},
{
name: "prefix not at start returns false",