Skip to content

Commit 8ea226a

Browse files
committed
docs(cli): richer Long help for get/list service-account
get and list previously set Long to their ShortDesc. Give them a one-line Long that explains what fields are returned, notes that API key secrets are never included, and points at --output json for scripting — matching the richer Long text of the create/update/delete siblings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWQ362qtJBoP3ncxRck9qu
1 parent 6ed49d2 commit 8ea226a

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

cmd/kosli/getServiceAccount.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import (
1212

1313
const getServiceAccountShortDesc = `Get a service account's metadata.`
1414

15+
const getServiceAccountLongDesc = getServiceAccountShortDesc + `
16+
17+
The metadata includes the name, description, privilege, and creation time. The
18+
secret values of the account's API keys are never returned. Use ^--output json^
19+
to get the raw response for scripting.`
20+
1521
const getServiceAccountExample = `
1622
# get the metadata of a service account:
1723
kosli get service-account yourServiceAccountName \
@@ -29,7 +35,7 @@ func newGetServiceAccountCmd(out io.Writer) *cobra.Command {
2935
Use: "service-account SERVICE-ACCOUNT-NAME",
3036
Aliases: []string{"sa"},
3137
Short: getServiceAccountShortDesc,
32-
Long: getServiceAccountShortDesc,
38+
Long: getServiceAccountLongDesc,
3339
Example: getServiceAccountExample,
3440
Args: cobra.ExactArgs(1),
3541
PreRunE: func(cmd *cobra.Command, args []string) error {

cmd/kosli/listServiceAccounts.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import (
1212

1313
const listServiceAccountsShortDesc = `List service accounts in an organization.`
1414

15+
const listServiceAccountsLongDesc = listServiceAccountsShortDesc + `
16+
17+
Each entry shows the name, description, privilege, and creation time. The secret
18+
values of any API keys are never listed. Use ^--output json^ to get the raw
19+
response for scripting.`
20+
1521
const listServiceAccountsExample = `
1622
# list the service accounts in an organization:
1723
kosli list service-accounts \
@@ -29,7 +35,7 @@ func newListServiceAccountsCmd(out io.Writer) *cobra.Command {
2935
Use: "service-accounts",
3036
Aliases: []string{"sa", "sas", "service-account"},
3137
Short: listServiceAccountsShortDesc,
32-
Long: listServiceAccountsShortDesc,
38+
Long: listServiceAccountsLongDesc,
3339
Example: listServiceAccountsExample,
3440
Args: cobra.NoArgs,
3541
PreRunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)