Skip to content

Commit

Permalink
make add resource commands public (#1054)
Browse files Browse the repository at this point in the history
* make add resource commands public

* update template
  • Loading branch information
etsai-stripe authored Apr 4, 2023
1 parent 2956b1e commit 4e5c2fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cmd/resources_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import (
"github.com/stripe/stripe-cli/pkg/cmd/resource"
)

func AddResourceCmds(rootCmd *cobra.Command) {
addAllResourcesCmds(rootCmd)
}

func addAllResourcesCmds(rootCmd *cobra.Command) {
// Namespace commands
_ = resource.NewNamespaceCmd(rootCmd, "")
Expand Down
4 changes: 4 additions & 0 deletions pkg/gen/resources_cmds.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import (
"github.com/stripe/stripe-cli/pkg/cmd/resource"
)

func AddResourceCmds(rootCmd *cobra.Command) {
addAllResourcesCmds(rootCmd)
}

func addAllResourcesCmds(rootCmd *cobra.Command) {
// Namespace commands
_ = resource.NewNamespaceCmd(rootCmd, ""){{ range $nsName, $nsData := .Namespaces }}{{ if $nsData.Resources }}{{ if ne $nsName "" }}
Expand Down

0 comments on commit 4e5c2fd

Please sign in to comment.