JSON Marshal/Unmarshal Tags

This commit is contained in:
2023-08-23 10:58:10 -05:00
parent b3e09780fb
commit 13cd41aa3f
2 changed files with 39 additions and 39 deletions

View File

@@ -19,15 +19,15 @@ var (
)
type Timer struct {
Id int // Internal timer id
Original string // Original raw timer text
StartDate time.Time
FinishDate time.Time
Finished bool
Notes string // Notes part of timer text
Projects []string
Contexts []string
AdditionalTags map[string]string // Addon tags will be available here
Id int `json:"id"` // Internal timer id
Original string `json:"original"` // Original raw timer text
StartDate time.Time `json:"startDate"`
FinishDate time.Time `json:"finishDate"`
Finished bool `json:"finished"`
Notes string `json:"notes"` // Notes part of timer text
Projects []string `json:"projects"`
Contexts []string `json:"contexts"`
AdditionalTags map[string]string `json:"additionalTags"` // Addon tags will be available here
}
// String returns a complete timer string in timer.txt format.