File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
internal/cli/iam/projects Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import (
2424 "github.com/spf13/cobra"
2525)
2626
27- var createTemplate = "Project '{{.ID}}' created.\n "
27+ const atlasCreateTemplate = "Project '{{.ID}}' created.\n "
2828
2929type CreateOpts struct {
3030 cli.GlobalOpts
@@ -49,23 +49,23 @@ func (opts *CreateOpts) Run() error {
4949 if err != nil {
5050 return err
5151 }
52- if config .Service () != config .CloudService {
53- createTemplate += "Agent API Key: '{{.AgentAPIKey}}'\n "
54- }
5552
5653 return opts .Print (r )
5754}
5855
5956// mongocli iam project(s) create <name> [--orgId orgId].
6057func CreateBuilder () * cobra.Command {
6158 opts := & CreateOpts {}
62- opts .Template = createTemplate
59+ opts .Template = atlasCreateTemplate
6360 cmd := & cobra.Command {
6461 Use : "create <name>" ,
6562 Short : "Create a project." ,
6663 Args : require .ExactArgs (1 ),
6764 PreRunE : func (cmd * cobra.Command , args []string ) error {
6865 opts .OutWriter = cmd .OutOrStdout ()
66+ if config .Service () != config .CloudService {
67+ opts .Template += "Agent API Key: '{{.AgentAPIKey}}'\n "
68+ }
6969 return opts .init ()
7070 },
7171 RunE : func (cmd * cobra.Command , args []string ) error {
You can’t perform that action at this time.
0 commit comments