raven.go: add arg length check to twt command
This commit is contained in:
parent
057771467d
commit
c274e63e82
4 changed files with 20 additions and 15 deletions
5
raven.go
5
raven.go
|
@ -28,7 +28,12 @@ func run(args []string) error {
|
|||
} else {
|
||||
switch args[1] {
|
||||
case "twt":
|
||||
if len(args) > 2 {
|
||||
return Post(args[2], cfg.FeedFile, cfg.FeedAscend)
|
||||
} else {
|
||||
helpMe(args[0])
|
||||
return errors.New("ARG is required with the twt command")
|
||||
}
|
||||
case "feed":
|
||||
if len(args) > 2 {
|
||||
return GetFeed(args[2], cfg.FriendsFile, cfg.MaxPosts)
|
||||
|
|
Loading…
Reference in a new issue