Skip to content

Commit

Permalink
validated args
Browse files Browse the repository at this point in the history
  • Loading branch information
devhindo committed Apr 4, 2024
1 parent 696876d commit f606afe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cli/x/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ func HandleArgs() {
checkArgsequals2()
Version()
case "f": // x -t "hi" 5h6m7s
checkArgsequals2()
tweet.PostFutureTweet(os.Args)
case "-f":
checkArgsequals2()
tweet.PostFutureTweet(os.Args)
default:

Expand Down Expand Up @@ -88,4 +90,11 @@ func checkArgsequals2() {
}
}

func checkFutureTweetArgs() {
if len(os.Args) < 4 {
fmt.Println("No tweet given | try 'x help'")
os.Exit(0)
}

}

0 comments on commit f606afe

Please sign in to comment.