From e3f7e1135d4f3f950a0933e0a26d47f34f148cf3 Mon Sep 17 00:00:00 2001 From: Nikolaus Gotsche Date: Wed, 31 Jan 2018 03:30:30 +0100 Subject: DeleteTasks AddCustomers Funcs --- main.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 5fc8050..0d73a7a 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,8 @@ import ( //var svar string var starttime,stoptime string var projectid, edittaskid, editprojectid int +var deltask int +var addcustomer bool var newproject, newtask, stoptask, allproj, runinter bool //var red, green, yellow, cyan color @@ -28,6 +30,10 @@ func init() { //boldGreen := color.New(color.FgGreen, color.Bold) //boldRed := color.New(color.FgRed, color.Bold) + flag.BoolVar(&addcustomer, + "addcustomer", + false, + "Adds a new Customer") flag.BoolVar(&allproj, "all", false, @@ -40,6 +46,10 @@ func init() { "startnow", false, "Start a new Task in current project") + flag.IntVar(&deltask, + "deletetask", + 0, + "Specify which Task to delete") flag.IntVar(&edittaskid, "edittask", 0, @@ -102,6 +112,9 @@ func main() { if newproject { newProject() os.Exit(0) + } else if addcustomer { + addCustomer() + os.Exit(0) } else if newtask { newTask(projectid) stdOut() @@ -124,6 +137,8 @@ func main() { //showLastProject() //getClosedTasks(0) //showOpenTask() + } else if (deltask>0) { + deleteTask(deltask) } else if (edittaskid>0) { editTask(edittaskid) } else if (editprojectid>0) { -- cgit v1.2.3