Przeglądaj źródła

acme: add missing err assignment check

Spotted it thanks to a proposal in
https://github.com/golang/go/issues/19727.

Change-Id: I389a3fc0db3cf64fba41c3ecd70a236917ea8fa3
Reviewed-on: https://go-review.googlesource.com/41698
Run-TryBot: Sam Whited <sam@samwhited.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Sam Whited <sam@samwhited.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Alex Vaghin 8 lat temu
rodzic
commit
c7af5bf263
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      acme/acme.go

+ 1 - 1
acme/acme.go

@@ -152,7 +152,7 @@ func (c *Client) Discover(ctx context.Context) (Directory, error) {
 			CAA     []string `json:"caa-identities"`
 		}
 	}
-	if json.NewDecoder(res.Body).Decode(&v); err != nil {
+	if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
 		return Directory{}, err
 	}
 	c.dir = &Directory{