aboutsummaryrefslogtreecommitdiffstats
path: root/timetask/time_entry.go
diff options
context:
space:
mode:
authorTeddy Wing2017-03-12 17:33:34 +0100
committerTeddy Wing2017-03-12 17:33:34 +0100
commit1ccce0fc6a9eb58cff99b00849a9f28610157504 (patch)
treee4c4e83e334f0bddcbe3f8bb68817850afd6c433 /timetask/time_entry.go
parent3291b4dd10cd3b9b2a5d4a4d4ebebe99038ad948 (diff)
downloadtimetasker-1ccce0fc6a9eb58cff99b00849a9f28610157504.tar.bz2
time_entry.go: Properly unmarshal Time field
Fix 7a8db5312bbb43c986fbae7aa14960e22080b03b to ensure that the `Time` field actually gets unmarshalled into `TimeEntry` structs.
Diffstat (limited to 'timetask/time_entry.go')
-rw-r--r--timetask/time_entry.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/timetask/time_entry.go b/timetask/time_entry.go
index f78753a..1cb7bc8 100644
--- a/timetask/time_entry.go
+++ b/timetask/time_entry.go
@@ -21,6 +21,7 @@ func (te *TimeEntry) UnmarshalYAML(unmarshal func(interface{}) error) error {
Task string
WorkType string `yaml:"work_type"`
Date string
+ Time uint
Billable bool
Description string
}
@@ -40,6 +41,7 @@ func (te *TimeEntry) UnmarshalYAML(unmarshal func(interface{}) error) error {
te.Task = auxiliary.Task
te.WorkType = auxiliary.WorkType
te.Date = date
+ te.Time = auxiliary.Time
te.Billable = auxiliary.Billable
te.Description = auxiliary.Description