From f4cc1699a661197450f86a61f7c53e9c0b96bef1 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 27 Dec 2015 03:15:26 +0100 Subject: bikeshading --- cmd/acme/config.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cmd/acme/config.go') diff --git a/cmd/acme/config.go b/cmd/acme/config.go index 1180f16..41561f4 100644 --- a/cmd/acme/config.go +++ b/cmd/acme/config.go @@ -25,6 +25,7 @@ type Config struct { type defaults struct { Gracetime duration Listen string + ListenTLS string Provider string Account string Basedir string @@ -143,12 +144,12 @@ func LoadConfig(fname string) (*Config, error) { type PrivKey interface { KeyPath() string KeySize() int - KeyExists() bool + HasKey() bool } type Cert interface { CertPath() string - CertExists() bool + HasCert() bool } func exists(fname string) bool { @@ -161,12 +162,12 @@ func exists(fname string) bool { func (d desire) CertPath() string { return d.Cert } func (d desire) KeyPath() string { return d.Key } func (d desire) KeySize() int { return d.Size } -func (d desire) KeyExists() bool { return exists(d.Key) } -func (d desire) CertExists() bool { return exists(d.Cert) } +func (d desire) HasKey() bool { return exists(d.Key) } +func (d desire) HasCert() bool { return exists(d.Cert) } func (a account) KeyPath() string { return a.Key } func (a account) KeySize() int { return a.Size } -func (a account) KeyExists() bool { return exists(a.Key) } +func (a account) HasCert() bool { return exists(a.Key) } type duration struct{ time.Duration } -- cgit v1.2.3