From 1040a2f5df5d0b03e8dfb9076a25590bc8f74ae8 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 24 Jan 2016 12:47:13 +0100 Subject: [PATCH] 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. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a654c0d2..5d997c32 100644 --- a/README.md +++ b/README.md @@ -176,9 +176,9 @@ if err != nil { // 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. bundle := false -certificates, err := client.ObtainCertificate([]string{"mydomain.com"}, bundle, nil) -if err != nil { - log.Fatal(err) +certificates, failures := client.ObtainCertificate([]string{"mydomain.com"}, bundle, nil) +if len(failures) > 0 { + log.Fatal(failures) } // Each certificate comes back with the cert bytes, the bytes of the client's