aboutsummaryrefslogtreecommitdiff
path: root/cmd/acme/config.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-02-16 13:58:44 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-02-16 13:58:44 +0100
commit0c39b991e9289a41ef656220454aa08330209511 (patch)
treef793eb4f4a0ea39af2de34b5e45c4f89774b82a8 /cmd/acme/config.go
parent7f6dd28284d989019baaf63f84825814e3734b59 (diff)
Rename filed names
Diffstat (limited to 'cmd/acme/config.go')
-rw-r--r--cmd/acme/config.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/cmd/acme/config.go b/cmd/acme/config.go
index 982f4ac..15c3403 100644
--- a/cmd/acme/config.go
+++ b/cmd/acme/config.go
@@ -29,7 +29,7 @@ type account struct {
Mail string
Phone string
KeySize int
- Key string
+ KeyFile string
}
type desire struct {
@@ -37,8 +37,8 @@ type desire struct {
Account string
Altnames []string
KeySize int
- Key string
- Cert string
+ KeyFile string
+ CrtFile string
Webroot string
Hook []string
}
@@ -46,8 +46,8 @@ type desire struct {
var (
errNoProvider = errors.New("no provider specified")
errNoAccount = errors.New("no account specified")
- errNoKey = errors.New("no key specified")
- errNoCert = errors.New("no cert specified")
+ errNoKey = errors.New("no key file specified")
+ errNoCrt = errors.New("no crt file specified")
errNoAltNames = errors.New("no altnames specified")
errNoMail = errors.New("no mail specified")
)
@@ -80,11 +80,11 @@ func LoadConfig(fname string) (*Config, error) {
if v.Mail == "" {
return nil, errNoMail
}
- if v.Key == "" {
+ if v.KeyFile == "" {
return nil, errNoKey
}
if c.BaseDir != "" {
- v.Key = path.Join(c.BaseDir, v.Key)
+ v.KeyFile = path.Join(c.BaseDir, v.KeyFile)
}
c.Account[k] = v
}
@@ -98,15 +98,15 @@ func LoadConfig(fname string) (*Config, error) {
if v.KeySize == 0 {
v.KeySize = c.KeySize
}
- if v.Key == "" {
+ if v.KeyFile == "" {
return nil, errNoKey
}
- if v.Cert == "" {
- return nil, errNoCert
+ if v.CrtFile == "" {
+ return nil, errNoCrt
}
if c.BaseDir != "" {
- v.Key = path.Join(c.BaseDir, v.Key)
- v.Cert = path.Join(c.BaseDir, v.Cert)
+ v.KeyFile = path.Join(c.BaseDir, v.KeyFile)
+ v.CrtFile = path.Join(c.BaseDir, v.CrtFile)
}
v.Altnames = checkWWW(v.Altnames)
c.Desire[k] = v