Skip to content

Commit 4ae4879

Browse files
committed
fix: add better comment
1 parent b24f844 commit 4ae4879

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

cmd/extensions.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cmd
33
import (
44
"bytes"
55
"context"
6+
"encoding/json"
67
"fmt"
78
"io"
89
"net/http"
@@ -76,7 +77,12 @@ func (e ExtensionsCmd) List(ctx context.Context, in ExtensionsListInput) error {
7677
fmt.Println("[]")
7778
return nil
7879
}
79-
return util.PrintPrettyJSONSlice(*items)
80+
bs, err := json.MarshalIndent(*items, "", " ")
81+
if err != nil {
82+
return err
83+
}
84+
fmt.Println(string(bs))
85+
return nil
8086
}
8187

8288
if items == nil || len(*items) == 0 {
@@ -320,7 +326,12 @@ func (e ExtensionsCmd) Upload(ctx context.Context, in ExtensionsUploadInput) err
320326
}
321327

322328
if in.Output == "json" {
323-
return util.PrintPrettyJSON(item)
329+
bs, err := json.MarshalIndent(item, "", " ")
330+
if err != nil {
331+
return err
332+
}
333+
fmt.Println(string(bs))
334+
return nil
324335
}
325336

326337
name := item.Name
@@ -479,5 +490,5 @@ func init() {
479490
extensionsBuildWebBotAuthCmd.Flags().String("url", "http://127.0.0.1:10001", "Base URL for update.xml and policy templates")
480491
extensionsBuildWebBotAuthCmd.Flags().String("key", "", "Path to Ed25519 private key file (JWK or PEM format)")
481492
extensionsBuildWebBotAuthCmd.Flags().String("upload", "", "Upload extension to Kernel with specified name (e.g., --upload web-bot-auth)")
482-
extensionsBuildWebBotAuthCmd.Flags().String("signature-agent", "", "URL of the signature agent")
493+
extensionsBuildWebBotAuthCmd.Flags().String("signature-agent", "", "Base URL of the signature agent (e.g., https://agent.example.com). Verifiers will look up /.well-known/http-message-signatures-directory at this URL.")
483494
}

0 commit comments

Comments
 (0)