diff options
author | Teddy Wing | 2017-06-03 11:24:55 +0200 |
---|---|---|
committer | Teddy Wing | 2017-06-03 11:28:25 +0200 |
commit | d998a82d4019b1fc5a15734f091852b1b0f086d4 (patch) | |
tree | 67959784f74f803e9c9528d246815e320f4d238c /timetask/fields.go | |
parent | e99c7b69e0981d4a7b87310cd811b90a2ffbe12f (diff) | |
download | timetasker-d998a82d4019b1fc5a15734f091852b1b0f086d4.tar.bz2 |
Create a new Project type
This corresponds to a "project" entry in the new config2.toml file. (See
13c84cd9973458750305c72a919cf921d9b22b04).
Instead of decoding generic `interface{}`s as projects from the TOML,
make them a real type.
The reason why we're using `int`s where we used to use strings is that
the new TOML format will have users write IDs directly in the config
file, instead of having the program automatically search for those IDs
and use them as we had previously designed. Maybe we'll bring that
functionality back at some point, but for now it's too bothersome to
implement and I don't consider it worth the trouble.
Diffstat (limited to 'timetask/fields.go')
-rw-r--r-- | timetask/fields.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/timetask/fields.go b/timetask/fields.go index f3bb27d..da2b37d 100644 --- a/timetask/fields.go +++ b/timetask/fields.go @@ -16,6 +16,16 @@ package timetask // WorkTypes []WorkType `yaml:"work_types"` // } +type Project struct { + Client int + Project int + Module int + Task int + WorkType int + Time int + Billable bool +} + // type Module struct { // ID int // Name string |