chore(cli): gofmt sweep

`gofmt -w cli/` — trailing newlines, minor whitespace alignment. Caught
during PR-readiness review (`gofmt -l .` had been non-clean since the
em-dash → ASCII bulk replace earlier in the v0.4 series).
This commit is contained in:
nullkey
2026-05-15 05:00:26 +08:00
committed by lyingbug
parent f2e8e3f56c
commit 69fbbfc252
30 changed files with 74 additions and 84 deletions
-1
View File
@@ -145,4 +145,3 @@ func validateName(name string) error {
}
return nil
}
-1
View File
@@ -140,4 +140,3 @@ func TestAdd_JSON(t *testing.T) {
t.Errorf("first added context must be current=true, got %v", got)
}
}
-1
View File
@@ -124,4 +124,3 @@ func clearContextSecrets(store secrets.Store, c config.Context, name string) {
_ = store.Delete(name, "api_key")
}
}
-1
View File
@@ -203,4 +203,3 @@ func TestRemove_Current_TTY_PromptNo(t *testing.T) {
t.Errorf("aborted remove must not mutate config")
}
}
+3 -3
View File
@@ -75,9 +75,9 @@ func TestUse_NotFound_DeterministicTieBreak(t *testing.T) {
t.Setenv("XDG_CONFIG_HOME", t.TempDir())
_, _ = iostreams.SetForTest(t)
cfg := &config.Config{Contexts: map[string]config.Context{
"prod": {Host: "https://a"},
"prom": {Host: "https://b"},
"prog": {Host: "https://c"},
"prod": {Host: "https://a"},
"prom": {Host: "https://b"},
"prog": {Host: "https://c"},
}}
if err := config.Save(cfg); err != nil {
t.Fatalf("Save: %v", err)