@@ -33,24 +33,24 @@ type inputModel struct {
3333func NewCmd (p * print.Printer ) * cobra.Command {
3434 cmd := & cobra.Command {
3535 Use : "create" ,
36- Short : "Create a Key Pair " ,
37- Long : "Create a Key Pair ." ,
36+ Short : "Creates a key pair " ,
37+ Long : "Creates a key pair ." ,
3838 Args : cobra .NoArgs ,
3939 Example : examples .Build (
4040 examples .NewExample (
41- `Create a new Key Pair with public-key "ssh-rsa xxx"` ,
41+ `Create a new key pair with public-key "ssh-rsa xxx"` ,
4242 "$ stackit beta key-pair create --public-key `ssh-rsa xxx`" ,
4343 ),
4444 examples .NewExample (
45- `Create a new Key Pair with public-key from file "/Users/username/.ssh/id_rsa.pub"` ,
45+ `Create a new key pair with public-key from file "/Users/username/.ssh/id_rsa.pub"` ,
4646 "$ stackit beta key-pair create --public-key `@/Users/username/.ssh/id_rsa.pub`" ,
4747 ),
4848 examples .NewExample (
49- `Create a new Key Pair with name "KEY_PAIR_NAME" and public-key "ssh-rsa yyy"` ,
49+ `Create a new key pair with name "KEY_PAIR_NAME" and public-key "ssh-rsa yyy"` ,
5050 "$ stackit beta key-pair create --name KEY_PAIR_NAME --public-key `ssh-rsa yyy`" ,
5151 ),
5252 examples .NewExample (
53- `Create a new Key Pair with public-key "ssh-rsa xxx" and labels "key=value,key1=value1"` ,
53+ `Create a new key pair with public-key "ssh-rsa xxx" and labels "key=value,key1=value1"` ,
5454 "$ stackit beta key-pair create --public-key `ssh-rsa xxx` --labels key=value,key1=value1" ,
5555 ),
5656 ),
@@ -68,7 +68,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
6868 }
6969
7070 if ! model .AssumeYes {
71- prompt := "Are your sure you want to create a Key Pair ?"
71+ prompt := "Are your sure you want to create a key pair ?"
7272 err = p .PromptForConfirmation (prompt )
7373 if err != nil {
7474 return err
@@ -79,7 +79,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
7979 req := buildRequest (ctx , model , apiClient )
8080 resp , err := req .Execute ()
8181 if err != nil {
82- return fmt .Errorf ("create Key Pair : %w" , err )
82+ return fmt .Errorf ("create key pair : %w" , err )
8383 }
8484
8585 return outputResult (p , model , resp )
@@ -90,9 +90,9 @@ func NewCmd(p *print.Printer) *cobra.Command {
9090}
9191
9292func configureFlags (cmd * cobra.Command ) {
93- cmd .Flags ().String (nameFlag , "" , "Key Pair name" )
93+ cmd .Flags ().String (nameFlag , "" , "key pair name" )
9494 cmd .Flags ().Var (flags .ReadFromFileFlag (), publicKeyFlag , "Public key to be imported (format: ssh-rsa|ssh-ed25519)" )
95- cmd .Flags ().StringToString (labelFlag , nil , "Labels are key-value string pairs which can be attached to a Key Pair . E.g. '--labels key1=value1,key2=value2,...'" )
95+ cmd .Flags ().StringToString (labelFlag , nil , "Labels are key-value string pairs which can be attached to a key pair . E.g. '--labels key1=value1,key2=value2,...'" )
9696
9797 err := cmd .MarkFlagRequired (publicKeyFlag )
9898 cobra .CheckErr (err )
@@ -146,17 +146,17 @@ func outputResult(p *print.Printer, model *inputModel, item *iaas.Keypair) error
146146 case print .JSONOutputFormat :
147147 details , err := json .MarshalIndent (item , "" , " " )
148148 if err != nil {
149- return fmt .Errorf ("marshal Key Pair : %w" , err )
149+ return fmt .Errorf ("marshal key pair : %w" , err )
150150 }
151151 p .Outputln (string (details ))
152152 case print .YAMLOutputFormat :
153153 details , err := yaml .MarshalWithOptions (item , yaml .IndentSequence (true ))
154154 if err != nil {
155- return fmt .Errorf ("marshal Key Pair : %w" , err )
155+ return fmt .Errorf ("marshal key pair : %w" , err )
156156 }
157157 p .Outputln (string (details ))
158158 default :
159- p .Outputf ("Created Key Pair %q.\n Key Pair Fingerprint: %q\n " , * item .Name , * item .Fingerprint )
159+ p .Outputf ("Created key pair %q.\n key pair Fingerprint: %q\n " , * item .Name , * item .Fingerprint )
160160 }
161161 return nil
162162}
0 commit comments