diff options
author | Teddy Wing | 2017-06-03 10:42:54 +0200 |
---|---|---|
committer | Teddy Wing | 2017-06-03 10:42:54 +0200 |
commit | 1a1d9c3c671d33f7013c94564007e2c5b33cea47 (patch) | |
tree | 0e940c68fb21fb1acf04f59787538aa27d4bca0b /main.go | |
parent | 13c84cd9973458750305c72a919cf921d9b22b04 (diff) | |
download | timetasker-1a1d9c3c671d33f7013c94564007e2c5b33cea47.tar.bz2 |
main.go: Cleanup from 13c84cd9973458750305c72a919cf921d9b22b04
* Get rid of the 'yaml' import since we're now using 'toml' instead.
* Get rid of commented code that's no longer relevant.
* Get rid of test code that checked that the config loaded
correctly.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -9,22 +9,12 @@ import ( "github.com/teddywing/timetasker/timetask" "github.com/BurntSushi/toml" - "gopkg.in/yaml.v2" ) -// type Config struct { -// Auth struct { -// Username string -// PasswordCmd string `yaml:"password_cmd"` -// } -// Fields timetask.Fields -// Defaults timetask.TimeEntry -// } - type Config struct { Auth struct { Username string - PasswordCmd string //`toml:"password_cmd"` + PasswordCmd string } Projects map[string]interface{} } @@ -33,8 +23,6 @@ var config Config func main() { loadConfig() - log.Printf("%+v", config) - return if len(os.Args) == 1 { fmt.Println("Not enough arguments") @@ -61,7 +49,6 @@ func main() { } func loadConfig() { - // config_str, err := ioutil.ReadFile("config2.toml") config = Config{} _, err := toml.DecodeFile("config2.toml", &config) if err != nil { |