Skip to content

Commit dd72e75

Browse files
committed
print sheep when empty args
1 parent 263bfbb commit dd72e75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/root.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmd
22

33
import (
44
"errors"
5+
"fmt"
56
"os"
67
"runtime/debug"
78
"strconv"
@@ -17,7 +18,6 @@ var (
1718

1819
var (
1920
ErrInvalidDuration = errors.New("invalid duration")
20-
ErrArgument = errors.New("invalid argument")
2121
)
2222

2323
var rootCmd = &cobra.Command{
@@ -29,7 +29,8 @@ var rootCmd = &cobra.Command{
2929
RunE: func(cmd *cobra.Command, args []string) error {
3030
var duration time.Duration
3131
if len(args) == 0 {
32-
return ErrArgument
32+
fmt.Print(simpleSheep.Awake)
33+
return nil
3334
}
3435

3536
if seconds, err := strconv.Atoi(args[0]); err == nil {

0 commit comments

Comments
 (0)