Skip to content

Commit

Permalink
Rename program to todo, add version (-v) flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kucukaslan committed Nov 13, 2021
1 parent 9351922 commit c93abed
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions main.go → todo.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ func main() {
printHelp()
}

fmt.Println(*v)
fmt.Println(*l)
if *v {
printVersion()
}
if *l {
printlist()
}
// fmt.Println(*v)
// fmt.Println(*l)
fmt.Println(*c)
fmt.Println(*a)
fmt.Println(*m)
Expand All @@ -57,3 +63,12 @@ func printHelp() {
fmt.Println("todo -m TODO-ID # mark as complete")
fmt.Println("todo -d TODO-ID # delete item")
}

func printVersion() {
fmt.Println("todo 0.0.2\nYou're currently using the version 0.02 released on 2021.11.13")
fmt.Println("There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.")
}

func printlist() {
fmt.Println("nList of the todo cli app")
}

0 comments on commit c93abed

Please sign in to comment.