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
+3 -3
View File
@@ -28,9 +28,9 @@ var docListFields = []string{
}
type ListOptions struct {
PageSize int // Items per server batch. With --all-pages, controls
// per-request load. Without, controls the single page size.
Status string // --status: filter by parse_status (server-side query param)
PageSize int // Items per server batch. With --all-pages, controls
// per-request load. Without, controls the single page size.
Status string // --status: filter by parse_status (server-side query param)
// Limit caps the returned items client-side (default 30; 0 = no cap).
// Applied after pagination / --all-pages accumulation and sort.
Limit int
+3 -2
View File
@@ -128,7 +128,9 @@ func TestList_KBIDRequired(t *testing.T) {
}
f := &cmdutil.Factory{
Config: func() (*config.Config, error) { return cfg, nil },
Client: func() (*sdk.Client, error) { return nil, errors.New("client should not be called when kb id is missing") },
Client: func() (*sdk.Client, error) {
return nil, errors.New("client should not be called when kb id is missing")
},
}
cmd := NewCmdList(f)
cmd.SetContext(context.Background())
@@ -337,4 +339,3 @@ func TestList_AllPages_WithLimit_StopsAtLimit(t *testing.T) {
// Should have called pages 1..3 (60 items) then capped at 50.
assert.LessOrEqual(t, len(svc.calls), 3, "should not walk past the page that fills --limit")
}
-1
View File
@@ -163,4 +163,3 @@ func walkMatches(root, pattern string) ([]string, error) {
}
return out, nil
}
-1
View File
@@ -191,4 +191,3 @@ func TestUploadRecursive_JSON_BareObject(t *testing.T) {
assert.True(t, typed.Silent, "JSON-path partial failure must be Silent")
assert.Equal(t, cmdutil.CodeServerError, typed.Code)
}