Skip to content

Commit 292439f

Browse files
committed
print command help when no flag is specified
1 parent ecad74c commit 292439f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmd/posts.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package cmd
22

33
import (
4-
"log"
5-
64
"github.com/hashnode/hashnode-cli/pkg/posts"
75
"github.com/spf13/cobra"
86
)
@@ -27,7 +25,7 @@ var postsCmd = &cobra.Command{
2725
case trending:
2826
posts.GetTrendingPosts()
2927
default:
30-
log.Println("Specify what posts to get")
28+
cmd.Help()
3129
}
3230
},
3331
}

0 commit comments

Comments
 (0)