@@ -17,12 +17,6 @@ import (
17
17
)
18
18
19
19
const (
20
- scheduleDescriptionLong = `Modify scheduled stop and start times for your workspace:
21
- * schedule show: show workspace schedule
22
- * schedule start: edit workspace start schedule
23
- * schedule stop: edit workspace stop schedule
24
- * schedule override-stop: edit stop time of active workspace
25
- `
26
20
scheduleShowDescriptionLong = `Shows the following information for the given workspace:
27
21
* The automatic start schedule
28
22
* The next scheduled start time
@@ -64,24 +58,24 @@ func schedules() *cobra.Command {
64
58
Annotations : workspaceCommand ,
65
59
Use : "schedule { show | start | stop | override } <workspace>" ,
66
60
Short : "Modify scheduled stop and start times for your workspace" ,
67
- Long : scheduleDescriptionLong ,
68
61
}
69
62
70
- scheduleCmd .AddCommand (scheduleShow ())
71
- scheduleCmd .AddCommand (scheduleStart ())
72
- scheduleCmd .AddCommand (scheduleStop ())
73
- scheduleCmd .AddCommand (scheduleOverride ())
63
+ scheduleCmd .AddCommand (
64
+ scheduleShow (),
65
+ scheduleStart (),
66
+ scheduleStop (),
67
+ scheduleOverride (),
68
+ )
74
69
75
70
return scheduleCmd
76
71
}
77
72
78
73
func scheduleShow () * cobra.Command {
79
74
showCmd := & cobra.Command {
80
- Annotations : workspaceCommand ,
81
- Use : "show <workspace-name>" ,
82
- Short : "Show workspace schedule" ,
83
- Long : scheduleShowDescriptionLong ,
84
- Args : cobra .ExactArgs (1 ),
75
+ Use : "show <workspace-name>" ,
76
+ Short : "Show workspace schedule" ,
77
+ Long : scheduleShowDescriptionLong ,
78
+ Args : cobra .ExactArgs (1 ),
85
79
RunE : func (cmd * cobra.Command , args []string ) error {
86
80
client , err := createClient (cmd )
87
81
if err != nil {
@@ -101,8 +95,7 @@ func scheduleShow() *cobra.Command {
101
95
102
96
func scheduleStart () * cobra.Command {
103
97
cmd := & cobra.Command {
104
- Annotations : workspaceCommand ,
105
- Use : "start <workspace-name> { <start-time> [day-of-week] [location] | manual }" ,
98
+ Use : "start <workspace-name> { <start-time> [day-of-week] [location] | manual }" ,
106
99
Example : formatExamples (
107
100
example {
108
101
Description : "Set the workspace to start at 9:30am (in Dublin) from Monday to Friday" ,
@@ -153,9 +146,8 @@ func scheduleStart() *cobra.Command {
153
146
154
147
func scheduleStop () * cobra.Command {
155
148
return & cobra.Command {
156
- Annotations : workspaceCommand ,
157
- Args : cobra .ExactArgs (2 ),
158
- Use : "stop <workspace-name> { <duration> | manual }" ,
149
+ Args : cobra .ExactArgs (2 ),
150
+ Use : "stop <workspace-name> { <duration> | manual }" ,
159
151
Example : formatExamples (
160
152
example {
161
153
Command : "coder schedule stop my-workspace 2h30m" ,
@@ -200,9 +192,8 @@ func scheduleStop() *cobra.Command {
200
192
201
193
func scheduleOverride () * cobra.Command {
202
194
overrideCmd := & cobra.Command {
203
- Args : cobra .ExactArgs (2 ),
204
- Annotations : workspaceCommand ,
205
- Use : "override-stop <workspace-name> <duration from now>" ,
195
+ Args : cobra .ExactArgs (2 ),
196
+ Use : "override-stop <workspace-name> <duration from now>" ,
206
197
Example : formatExamples (
207
198
example {
208
199
Command : "coder schedule override-stop my-workspace 90m" ,
0 commit comments