aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 10:42:54 +0200
committerTeddy Wing2017-06-03 10:42:54 +0200
commit1a1d9c3c671d33f7013c94564007e2c5b33cea47 (patch)
tree0e940c68fb21fb1acf04f59787538aa27d4bca0b /main.go
parent13c84cd9973458750305c72a919cf921d9b22b04 (diff)
downloadtimetasker-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.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/main.go b/main.go
index bfb56b8..61cdce6 100644
--- a/main.go
+++ b/main.go
@@ -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 {