Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f994cb

Browse files
committed
fixup! feat: add autostart/autostop show, show autostart/autostop schedule in ls output
1 parent7b3e862 commit4f994cb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎cli/autostart.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ func autostartShow() *cobra.Command {
5252
}
5353

5454
ifworkspace.AutostartSchedule=="" {
55-
_,_=fmt.Fprintf(cmd.OutOrStdout(),"not enabled")
55+
_,_=fmt.Fprintf(cmd.OutOrStdout(),"not enabled\n")
5656
returnnil
5757
}
5858

5959
validSchedule,err:=schedule.Weekly(workspace.AutostartSchedule)
6060
iferr!=nil {
6161
// This should never happen.
62-
_,_=fmt.Fprintf(cmd.OutOrStdout(),"invalid autostart schedule %q for workspace %s: %s",workspace.AutostartSchedule,workspace.Name,err.Error())
62+
_,_=fmt.Fprintf(cmd.OutOrStdout(),"invalid autostart schedule %q for workspace %s: %s\n",workspace.AutostartSchedule,workspace.Name,err.Error())
6363
returnnil
6464
}
6565

66-
_,_=fmt.Fprintf(cmd.OutOrStdout(),"\nschedule: %s\nnext: %s\n",workspace.AutostartSchedule,validSchedule.Next(time.Now()))
66+
_,_=fmt.Fprintf(cmd.OutOrStdout(),"schedule: %s\nnext: %s\n",workspace.AutostartSchedule,validSchedule.Next(time.Now()))
6767

6868
returnnil
6969
},

‎cli/autostop.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ func autostopShow() *cobra.Command {
5252
}
5353

5454
ifworkspace.AutostopSchedule=="" {
55-
_,_=fmt.Fprintf(cmd.OutOrStdout(),"not enabled")
55+
_,_=fmt.Fprintf(cmd.OutOrStdout(),"not enabled\n")
5656
returnnil
5757
}
5858

5959
validSchedule,err:=schedule.Weekly(workspace.AutostopSchedule)
6060
iferr!=nil {
6161
// This should never happen.
62-
_,_=fmt.Fprintf(cmd.OutOrStdout(),"invalid autostop schedule %q for workspace %s: %s",workspace.AutostopSchedule,workspace.Name,err.Error())
62+
_,_=fmt.Fprintf(cmd.OutOrStdout(),"invalid autostop schedule %q for workspace %s: %s\n",workspace.AutostopSchedule,workspace.Name,err.Error())
6363
returnnil
6464
}
6565

66-
_,_=fmt.Fprintf(cmd.OutOrStdout(),"\nschedule: %s\nnext: %s\n",workspace.AutostopSchedule,validSchedule.Next(time.Now()))
66+
_,_=fmt.Fprintf(cmd.OutOrStdout(),"schedule: %s\nnext: %s\n",workspace.AutostopSchedule,validSchedule.Next(time.Now()))
6767

6868
returnnil
6969
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp