aboutsummaryrefslogtreecommitdiff
path: root/cmd/acme/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/acme/config.go')
-rw-r--r--cmd/acme/config.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/cmd/acme/config.go b/cmd/acme/config.go
index b880c11..c12732f 100644
--- a/cmd/acme/config.go
+++ b/cmd/acme/config.go
@@ -6,12 +6,16 @@ import (
"github.com/BurntSushi/toml"
)
+type Config struct {
+ Account []Account
+}
+
type Account struct {
Mail string
Key string
Provider string
Want []Want
- Hook Hook
+ Hook []Hook
}
type Want struct {
@@ -24,18 +28,11 @@ type Hook struct {
CMD string
}
-func ReadConfig(fname string) Account {
- var c Account
+func ReadConfig(fname string) Config {
+ var c Config
_, err := toml.DecodeFile(fname, &c)
if err != nil {
log.Fatal(err)
}
return c
}
-
-/*
-func main() {
- a := ReadConfig("acme.toml")
- log.Printf("%+v\n", a)
-}
-*/