forked from TrueCloudLab/lego
Fix the example in the README
The change fixes the example in the README. `ObtainCertificate` returns a map of "failures" and not a standard error as second return value.
This commit is contained in:
parent
1ceed018fd
commit
1040a2f5df
1 changed files with 3 additions and 3 deletions
|
@ -176,9 +176,9 @@ if err != nil {
|
||||||
// The acme library takes care of completing the challenges to obtain the certificate(s).
|
// The acme library takes care of completing the challenges to obtain the certificate(s).
|
||||||
// Of course, the hostnames must resolve to this machine or it will fail.
|
// Of course, the hostnames must resolve to this machine or it will fail.
|
||||||
bundle := false
|
bundle := false
|
||||||
certificates, err := client.ObtainCertificate([]string{"mydomain.com"}, bundle, nil)
|
certificates, failures := client.ObtainCertificate([]string{"mydomain.com"}, bundle, nil)
|
||||||
if err != nil {
|
if len(failures) > 0 {
|
||||||
log.Fatal(err)
|
log.Fatal(failures)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Each certificate comes back with the cert bytes, the bytes of the client's
|
// Each certificate comes back with the cert bytes, the bytes of the client's
|
||||||
|
|
Loading…
Reference in a new issue