diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-10 00:16:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-10 00:16:10 +0900 |
| commit | 67c1fcf7467e59edea1d50358dc35bb5dcde3224 (patch) | |
| tree | 22c9a70a27ec06f016fb1b539ea3182bb2c625ff /cmd | |
| parent | 6a90aaa2ec54518c68fed97380fa316ce25fb6a1 (diff) | |
| download | term-clock-67c1fcf7467e59edea1d50358dc35bb5dcde3224.tar.gz term-clock-67c1fcf7467e59edea1d50358dc35bb5dcde3224.tar.zst term-clock-67c1fcf7467e59edea1d50358dc35bb5dcde3224.zip | |
chore: go fmt
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/clock.go | 6 | ||||
| -rw-r--r-- | cmd/timer.go | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/cmd/clock.go b/cmd/clock.go index 3e12590..71244c4 100644 --- a/cmd/clock.go +++ b/cmd/clock.go @@ -81,8 +81,8 @@ func cmdClock(cmd *cobra.Command, args []string) { } } -var clockCmd =&cobra.Command{ - Use: "clock", +var clockCmd = &cobra.Command{ + Use: "clock", Short: "Clock mode", - Run: cmdClock, + Run: cmdClock, } diff --git a/cmd/timer.go b/cmd/timer.go index ff11451..b4f9857 100644 --- a/cmd/timer.go +++ b/cmd/timer.go @@ -10,8 +10,8 @@ import ( ) func drawTimer(scr *term.Screen, leftTime time.Duration, bgStyle, fgStyle term.Style) { - if leftTime<=0{ - leftTime=0 + if leftTime <= 0 { + leftTime = 0 bgStyle, fgStyle = fgStyle, bgStyle } @@ -56,7 +56,7 @@ func drawTimer(scr *term.Screen, leftTime time.Duration, bgStyle, fgStyle term.S func cmdTimer(cmd *cobra.Command, args []string) { timerTime, err := time.ParseDuration(args[0]) if err != nil { - log.Fatalf("%+v", err) + log.Fatalf("%+v", err) } scr, err := term.NewScreen() @@ -89,9 +89,9 @@ func cmdTimer(cmd *cobra.Command, args []string) { } } -var timerCmd =&cobra.Command{ - Use: "timer", +var timerCmd = &cobra.Command{ + Use: "timer", Short: "Timer mode", - Run: cmdTimer, - Args: cobra.ExactArgs(1), + Run: cmdTimer, + Args: cobra.ExactArgs(1), } |
