aboutsummaryrefslogtreecommitdiff
path: root/workstack.go
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-10 14:06:18 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-10 14:07:21 +0100
commitad898317914439c33e5670d9018646799f2d6c3f (patch)
tree70047a56ae893441f3d1499d653475bb758d0ed7 /workstack.go
parent45e65c66bbcded97135503068881214ee644d2f7 (diff)
Better flags parsing and "top" comamnd
Diffstat (limited to 'workstack.go')
-rw-r--r--workstack.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/workstack.go b/workstack.go
index f7bc41c..45b5d67 100644
--- a/workstack.go
+++ b/workstack.go
@@ -16,10 +16,6 @@ type TaskDone struct {
Date time.Time
}
-func (t TaskDone) String() string {
- return fmt.Sprintf("(%s) %s", t.Date.Format(DateLayout), t.Task)
-}
-
type Tag string
type Task struct {
@@ -27,6 +23,10 @@ type Task struct {
Tag Tag
}
+func (t TaskDone) String() string {
+ return fmt.Sprintf("(%s) %s", t.Date.Format(DateLayout), t.Task)
+}
+
func (t Task) String() string {
if t.Tag != "" {
return fmt.Sprintf("{%s} %s", t.Tag, t.Text)
@@ -36,14 +36,12 @@ func (t Task) String() string {
}
var (
- // Persistent storage for Tasks
- Gobdata string = "tasks.gob"
DateLayout string = "15:04:05 02/01/2006"
)
const (
TASK_LIST_COUNT = 5
- GOBDATA_FILENAME = "tasks.gob"
+ GOBDATA_FILENAME = "workstack.gob"
)
func GetGobdataPath() string {