From 2ed8a411e9a39250e4fd972cc0dde12c80321871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Sun, 11 Oct 2020 21:15:05 +0100 Subject: [PATCH] Changed output --- z/track.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/z/track.go b/z/track.go index 53216db..9d8a2e7 100644 --- a/z/track.go +++ b/z/track.go @@ -22,13 +22,23 @@ var trackCmd = &cobra.Command{ } newEntry, err := NewEntry("", begin, finish, project, task, user) - database.AddEntry(newEntry, true) - entries, err := database.ListEntries() if err != nil { log.Fatal(err) } - fmt.Printf("%+v", entries) + entryId, err := database.AddEntry(user, newEntry, true) + if err != nil { + log.Fatal(err) + } + + // entries, err := database.ListEntries() + // if err != nil { + // log.Fatal(err) + // } + // fmt.Printf("%+v", entries) + + log.Printf("Added new entry with ID %s!\n", entryId) + return }, }