From 1576d4111d412a1c501b6a8630c4d559302b9b21 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Jun 2017 12:16:33 +0200 Subject: main.go: Add `Profile` to `Config` Require the config.toml file to come with a `[profile]` hash. This allows us to get the "person_id" for correct submission to TimeTask. Additionally, add a TOML tag to `PersonID` in `Profile` to allow it to be decoded. --- main.go | 1 + timetask/profile.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ccdcaed..aea2112 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,7 @@ type Config struct { Username string PasswordCmd string } + Profile timetask.Profile Projects map[string]timetask.Project } diff --git a/timetask/profile.go b/timetask/profile.go index 66e9197..9267ee6 100644 --- a/timetask/profile.go +++ b/timetask/profile.go @@ -1,5 +1,5 @@ package timetask type Profile struct { - PersonID int + PersonID int `toml:"person_id"` } -- cgit v1.2.3