Skip to content

Commit

Permalink
docs: add descriptions to cobra commands
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Sep 13, 2020
1 parent 43c1446 commit 607b76d
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 68 deletions.
1 change: 1 addition & 0 deletions cmd/identities/delete.go
Expand Up @@ -13,6 +13,7 @@ import (

var deleteCmd = &cobra.Command{
Use: "delete",
Short: "Delete identities by ID",
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
c := cliclient.NewClient(cmd)
Expand Down
1 change: 1 addition & 0 deletions cmd/identities/get.go
Expand Up @@ -13,6 +13,7 @@ import (

var getCmd = &cobra.Command{
Use: "get <id>",
Short: "Get an identity by ID",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
c := cliclient.NewClient(cmd)
Expand Down
2 changes: 2 additions & 0 deletions cmd/identities/put.go → cmd/identities/import.go
Expand Up @@ -20,6 +20,8 @@ import (
// putCmd represents the import command
var putCmd = &cobra.Command{
Use: "import <file.json [file-2.json [file-3.json] ...]>",
Short: "Import identities from files or STD_IN",
Long: "Import identities from files or STD_IN. Files are expected to each contain a single identity. The validity of files can be tested beforehand using the `validate` command.",
Run: importIdentities,
}

Expand Down
2 changes: 2 additions & 0 deletions cmd/identities/list.go
Expand Up @@ -16,6 +16,8 @@ import (

var listCmd = &cobra.Command{
Use: "list [<page> <per-page>]",
Short: "List identities",
Long: "List identities (paginated)",
Args: func(cmd *cobra.Command, args []string) error {
// zero or exactly two args
if len(args) != 0 && len(args) != 2 {
Expand Down
1 change: 1 addition & 0 deletions cmd/identities/patch.go
Expand Up @@ -8,6 +8,7 @@ import (

var patchCmd = &cobra.Command{
Use: "patch <file.json [file-2.json [file-3.json] ...]>",
Short: "Patch identities by ID (not yet implemented)",
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
// TODO
Expand Down
1 change: 1 addition & 0 deletions cmd/identities/root.go
Expand Up @@ -11,6 +11,7 @@ import (
// identitiesCmd represents the identity command
var identitiesCmd = &cobra.Command{
Use: "identities",
Short: "Tools to interact with remote identities",
}

func RegisterCommandRecursive(parent *cobra.Command) {
Expand Down
1 change: 1 addition & 0 deletions cmd/identities/validate.go
Expand Up @@ -22,6 +22,7 @@ import (

var validateCmd = &cobra.Command{
Use: "validate <file.json [file-2.json [file-3.json] ...]>",
Short: "Validate local identity files",
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
c := cliclient.NewClient(cmd)
Expand Down
242 changes: 174 additions & 68 deletions docs/docs/milestones.md

Large diffs are not rendered by default.

0 comments on commit 607b76d

Please sign in to comment.