summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2018-01-31 03:30:30 +0100
committerNikolaus Gotsche <n@softwarefools.com>2018-01-31 03:30:30 +0100
commite3f7e1135d4f3f950a0933e0a26d47f34f148cf3 (patch)
treea22a353ef521afe3d741c43ab7bff143da83302b /main.go
parent5139266bcd5ce66ddd1e7f8ee85bc4969f8df08f (diff)
DeleteTasks AddCustomers Funcs
Diffstat (limited to 'main.go')
-rw-r--r--main.go15
1 files changed, 15 insertions, 0 deletions
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) {