Merge pull request #62 from glkz/fix-gofmt-errors

Fix gofmt errors
This commit is contained in:
xenolf 2015-12-27 17:01:46 +01:00
commit 357f5de272
5 changed files with 9 additions and 9 deletions

View file

@ -585,7 +585,7 @@ func (c *Client) requestCertificate(authz []authorizationResource, bundle bool)
case 202:
case 201:
cert, err := ioutil.ReadAll(limitReader(resp.Body, 1024 * 1024))
cert, err := ioutil.ReadAll(limitReader(resp.Body, 1024*1024))
resp.Body.Close()
if err != nil {
return CertificateResource{}, err
@ -658,7 +658,7 @@ func (c *Client) getIssuerCertificate(url string) ([]byte, error) {
}
defer resp.Body.Close()
issuerBytes, err := ioutil.ReadAll(limitReader(resp.Body, 1024 * 1024))
issuerBytes, err := ioutil.ReadAll(limitReader(resp.Body, 1024*1024))
if err != nil {
return nil, err
}

View file

@ -44,7 +44,7 @@ func (c challengeError) Error() string {
var errStr string
for _, validation := range c.records {
errStr = errStr + fmt.Sprintf("\tValidation for %s:%s\n\tResolved to:\n\t\t%s\n\tUsed: %s\n\n",
validation.Hostname, validation.Port, strings.Join(validation.ResolvedAddresses, "\n\t\t"), validation.UsedAddress)
validation.Hostname, validation.Port, strings.Join(validation.ResolvedAddresses, "\n\t\t"), validation.UsedAddress)
}
return fmt.Sprintf("%s\nError Detail:\n%s", c.RemoteError.Error(), errStr)

2
cli.go
View file

@ -49,7 +49,7 @@ func main() {
Action: renew,
Flags: []cli.Flag{
cli.IntFlag{
Name: "days",
Name: "days",
Value: 0,
Usage: "The number of days left on a certificate to renew it.",
},

View file

@ -197,7 +197,7 @@ func renew(c *cli.Context) {
logger().Printf("Could not get Certification expiration for domain %s", domain)
}
if int(expTime.Sub(time.Now()).Hours() / 24.0) > c.Int("days") {
if int(expTime.Sub(time.Now()).Hours()/24.0) > c.Int("days") {
return
}
}