From fa26e22f7c442c0f434685130020a8b32b6ad7d9 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 10 Mar 2016 17:24:18 +0100 Subject: Encapsulate Solvers --- cmd/acme/main.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'cmd') diff --git a/cmd/acme/main.go b/cmd/acme/main.go index b6ee054..ea9ddd0 100644 --- a/cmd/acme/main.go +++ b/cmd/acme/main.go @@ -84,17 +84,12 @@ func requestCert(prov *acme.Provider, acc *acme.Account, d domain) error { } } - sols := make(acme.Solvers) - + sols := acme.NewSolvers() if d.Webroot != "" { - sols[acme.ChallengeHTTP] = acme.NewWebrootSolver(d.Webroot) + sols.Add(acme.NewWebrootSolver(d.Webroot)) } else { - if httpSol != nil { - sols[acme.ChallengeHTTP] = httpSol - } - if tlsSol != nil { - sols[acme.ChallengeTLS] = tlsSol - } + sols.Add(httpSol) + sols.Add(tlsSol) } for _, an := range d.Altnames { -- cgit v1.2.3