Change the way domains and hostnames are configured

This commit is contained in:
Mike Cheng 2015-05-04 03:07:14 -04:00
parent 338c337736
commit 9faf101631
3 changed files with 21 additions and 16 deletions

View file

@ -7,7 +7,8 @@ import (
type Config struct {
Dev bool `json:"dev"`
Domains []string `json:"domains"`
Domain string `json:"domain"`
Hostnames []string `json:"hostnames"`
Interval int `json:"interval"`
Token string `json:"token"`
Username string `json:"username"`

View file

@ -14,13 +14,15 @@ func init() {
Token: "asdasdasdasdasdad",
Interval: 60,
Dev: true,
Domains: []string{"test.com", "fake.com"},
Domain: "test.com",
Hostnames: []string{"mail", "chat"},
},
Config{
Username: "production-account",
Token: "123123123123",
Interval: 3600,
Domains: []string{"live.com", "abc.live.com"},
Domain: "live.com",
Hostnames: []string{"mail", "support"},
},
}
}

View file

@ -5,13 +5,15 @@
"token": "asdasdasdasdasdad",
"interval": 60,
"dev": true,
"domains": [ "test.com", "fake.com" ]
"domain": "test.com",
"hostnames": [ "mail", "chat" ]
},
{
"username": "production-account",
"token": "123123123123",
"interval": 3600,
"domains": [ "live.com", "abc.live.com" ]
"domain": "live.com",
"hostnames": [ "mail", "support" ]
}
]
}