File tree Expand file tree Collapse file tree 4 files changed +50
-11
lines changed
Expand file tree Collapse file tree 4 files changed +50
-11
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ import (
2323
2424var dedicatedCmd = & cobra.Command {
2525 Use : "dedicated" ,
26- Short : "Traditional dedicated servers ." ,
27- Long : `Command line interface to traditional dedicated servers.
26+ Short : "All things dedicated server ." ,
27+ Long : `Command line interface for all things specific to running dedicated servers.
2828
2929For a full list of capabilities, please refer to the "Available Commands" section.` ,
3030 Run : func (cmd * cobra.Command , args []string ) {
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright © LiquidWeb
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ */
16+ package cmd
17+
18+ import (
19+ "os"
20+
21+ "github.com/spf13/cobra"
22+ )
23+
24+ var dedicatedServerCmd = & cobra.Command {
25+ Use : "server" ,
26+ Short : "Traditional dedicated servers." ,
27+ Long : `Command line interface for traditional dedicated servers.
28+
29+ For a full list of capabilities, please refer to the "Available Commands" section.` ,
30+ Run : func (cmd * cobra.Command , args []string ) {
31+ if err := cmd .Help (); err != nil {
32+ lwCliInst .Die (err )
33+ }
34+ os .Exit (1 )
35+ },
36+ }
37+
38+ func init () {
39+ dedicatedCmd .AddCommand (dedicatedServerCmd )
40+ }
Original file line number Diff line number Diff line change @@ -20,12 +20,11 @@ import (
2020
2121 "github.com/spf13/cobra"
2222
23- //"github.com/liquidweb/liquidweb-cli/instance"
2423 "github.com/liquidweb/liquidweb-cli/types/api"
2524 "github.com/liquidweb/liquidweb-cli/validate"
2625)
2726
28- var dedicatedDetailsCmd = & cobra.Command {
27+ var dedicatedServerDetailsCmd = & cobra.Command {
2928 Use : "details" ,
3029 Short : "Get details of a dedicated server" ,
3130 Long : `Get details of a dedicated server` ,
@@ -75,12 +74,12 @@ var dedicatedDetailsCmd = &cobra.Command{
7574}
7675
7776func init () {
78- dedicatedCmd .AddCommand (dedicatedDetailsCmd )
77+ dedicatedServerCmd .AddCommand (dedicatedServerDetailsCmd )
7978
80- dedicatedDetailsCmd .Flags ().Bool ("json" , false , "output in json format" )
81- dedicatedDetailsCmd .Flags ().String ("uniq-id" , "" , "uniq-id of the dedicated server" )
79+ dedicatedServerDetailsCmd .Flags ().Bool ("json" , false , "output in json format" )
80+ dedicatedServerDetailsCmd .Flags ().String ("uniq-id" , "" , "uniq-id of the dedicated server" )
8281
83- if err := dedicatedDetailsCmd .MarkFlagRequired ("uniq-id" ); err != nil {
82+ if err := dedicatedServerDetailsCmd .MarkFlagRequired ("uniq-id" ); err != nil {
8483 lwCliInst .Die (err )
8584 }
8685}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import (
2424 "github.com/liquidweb/liquidweb-cli/types/api"
2525)
2626
27- var dedicatedListCmd = & cobra.Command {
27+ var dedicatedServerListCmd = & cobra.Command {
2828 Use : "list" ,
2929 Short : "List Dedicated Servers on your account" ,
3030 Long : `List Dedicated Servers on your account` ,
@@ -67,7 +67,7 @@ var dedicatedListCmd = &cobra.Command{
6767}
6868
6969func init () {
70- dedicatedCmd .AddCommand (dedicatedListCmd )
70+ dedicatedServerCmd .AddCommand (dedicatedServerListCmd )
7171
72- dedicatedListCmd .Flags ().Bool ("json" , false , "output in json format" )
72+ dedicatedServerListCmd .Flags ().Bool ("json" , false , "output in json format" )
7373}
You can’t perform that action at this time.
0 commit comments