Skip to content

Commit eb8d576

Browse files
committed
chore: urfave/cli v3.2
1 parent 4f85909 commit eb8d576

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

cmd/cmd_renew.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,13 @@ func renewForCSR(cmd *cli.Command, account *Account, keyType certcrypto.KeyType,
348348
return launchHook(cmd.String(flgRenewHook), cmd.Duration(flgRenewHookTimeout), meta)
349349
}
350350

351-
func needRenewal(x509Cert *x509.Certificate, domain string, days int64) bool {
351+
func needRenewal(x509Cert *x509.Certificate, domain string, days int) bool {
352352
if x509Cert.IsCA {
353353
log.Fatalf("[%s] Certificate bundle starts with a CA certificate", domain)
354354
}
355355

356356
if days >= 0 {
357-
notAfter := int64(time.Until(x509Cert.NotAfter).Hours() / 24.0)
357+
notAfter := int(time.Until(x509Cert.NotAfter).Hours() / 24.0)
358358
if notAfter > days {
359359
log.Printf("[%s] The certificate expires in %d days, the number of days defined to perform the renewal is %d: no renewal.",
360360
domain, notAfter, days)

cmd/cmd_renew_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func Test_needRenewal(t *testing.T) {
6161
testCases := []struct {
6262
desc string
6363
x509Cert *x509.Certificate
64-
days int64
64+
days int
6565
expected bool
6666
}{
6767
{

cmd/cmd_revoke.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package cmd
22

33
import (
44
"context"
5-
"fmt"
6-
"math"
75

86
"github.com/go-acme/lego/v4/acme"
97
"github.com/go-acme/lego/v4/log"
@@ -35,7 +33,7 @@ func createRevoke() *cli.Command {
3533
" 0 (unspecified), 1 (keyCompromise), 2 (cACompromise), 3 (affiliationChanged)," +
3634
" 4 (superseded), 5 (cessationOfOperation), 6 (certificateHold), 8 (removeFromCRL)," +
3735
" 9 (privilegeWithdrawn), or 10 (aACompromise).",
38-
Value: uint64(acme.CRLReasonUnspecified),
36+
Value: acme.CRLReasonUnspecified,
3937
},
4038
},
4139
}
@@ -61,12 +59,7 @@ func revoke(_ context.Context, cmd *cli.Command) error {
6159
log.Fatalf("Error while revoking the certificate for domain %s\n\t%v", domain, err)
6260
}
6361

64-
rawReason := cmd.Uint(flgReason)
65-
if rawReason > math.MaxUint {
66-
return fmt.Errorf("reason value %d higher than %d", rawReason, uint64(math.MaxUint))
67-
}
68-
69-
reason := uint(rawReason)
62+
reason := cmd.Uint(flgReason)
7063

7164
err = client.Certificate.RevokeWithReason(certBytes, &reason)
7265
if err != nil {

docs/data/zz_cli_help.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ To display the documentation for a specific DNS provider, run:
150150
$ lego dnshelp -c code
151151
152152
Supported DNS providers:
153-
acme-dns, active24, alidns, allinkl, arvancloud, auroradns, autodns, azure, azuredns, bindman, bluecat, bookmyname, brandit, bunny, checkdomain, civo, clouddns, cloudflare, cloudns, cloudru, cloudxns, conoha, constellix, corenetworks, cpanel, derak, desec, designate, digitalocean, directadmin, dnshomede, dnsimple, dnsmadeeasy, dnspod, dode, domeneshop, dreamhost, duckdns, dyn, dynu, easydns, edgedns, efficientip, epik, exec, exoscale, f5xc, freemyip, gandi, gandiv5, gcloud, gcore, glesys, godaddy, googledomains, hetzner, hostingde, hosttech, httpnet, httpreq, huaweicloud, hurricane, hyperone, ibmcloud, iij, iijdpf, infoblox, infomaniak, internetbs, inwx, ionos, ipv64, iwantmyname, joker, liara, lightsail, limacity, linode, liquidweb, loopia, luadns, mailinabox, manageengine, manual, metaname, metaregistrar, mijnhost, mittwald, myaddr, mydnsjp, mythicbeasts, namecheap, namedotcom, namesilo, nearlyfreespeech, netcup, netlify, nicmanager, nifcloud, njalla, nodion, ns1, oraclecloud, otc, ovh, pdns, plesk, porkbun, rackspace, rainyun, rcodezero, regfish, regru, rfc2136, rimuhosting, route53, safedns, sakuracloud, scaleway, selectel, selectelv2, selfhostde, servercow, shellrent, simply, sonic, spaceship, stackpath, technitium, tencentcloud, timewebcloud, transip, ultradns, variomedia, vegadns, vercel, versio, vinyldns, vkcloud, volcengine, vscale, vultr, webnames, websupport, wedos, westcn, yandex, yandex360, yandexcloud, zoneee, zonomi
153+
acme-dns, active24, alidns, allinkl, arvancloud, auroradns, autodns, axelname, azure, azuredns, baiducloud, bindman, bluecat, bookmyname, brandit, bunny, checkdomain, civo, clouddns, cloudflare, cloudns, cloudru, cloudxns, conoha, constellix, corenetworks, cpanel, derak, desec, designate, digitalocean, directadmin, dnshomede, dnsimple, dnsmadeeasy, dnspod, dode, domeneshop, dreamhost, duckdns, dyn, dynu, easydns, edgedns, efficientip, epik, exec, exoscale, f5xc, freemyip, gandi, gandiv5, gcloud, gcore, glesys, godaddy, googledomains, hetzner, hostingde, hosttech, httpnet, httpreq, huaweicloud, hurricane, hyperone, ibmcloud, iij, iijdpf, infoblox, infomaniak, internetbs, inwx, ionos, ipv64, iwantmyname, joker, liara, lightsail, limacity, linode, liquidweb, loopia, luadns, mailinabox, manageengine, manual, metaname, metaregistrar, mijnhost, mittwald, myaddr, mydnsjp, mythicbeasts, namecheap, namedotcom, namesilo, nearlyfreespeech, netcup, netlify, nicmanager, nifcloud, njalla, nodion, ns1, oraclecloud, otc, ovh, pdns, plesk, porkbun, rackspace, rainyun, rcodezero, regfish, regru, rfc2136, rimuhosting, route53, safedns, sakuracloud, scaleway, selectel, selectelv2, selfhostde, servercow, shellrent, simply, sonic, spaceship, stackpath, technitium, tencentcloud, timewebcloud, transip, ultradns, variomedia, vegadns, vercel, versio, vinyldns, vkcloud, volcengine, vscale, vultr, webnames, websupport, wedos, westcn, yandex, yandex360, yandexcloud, zoneee, zonomi
154154
155155
More information: https://go-acme.github.io/lego/dns
156156
"""

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ require (
7575
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1128
7676
github.com/transip/gotransip/v6 v6.26.0
7777
github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec
78-
github.com/urfave/cli/v3 v3.1.1
78+
github.com/urfave/cli/v3 v3.2.0
7979
github.com/vinyldns/go-vinyldns v0.9.16
8080
github.com/volcengine/volc-sdk-golang v1.0.199
8181
github.com/vultr/govultr/v3 v3.17.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6
865865
github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec h1:2s/ghQ8wKE+UzD/hf3P4Gd1j0JI9ncbxv+nsypPoUYI=
866866
github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec/go.mod h1:BZr7Qs3ku1ckpqed8tCRSqTlp8NAeZfAVpfx4OzXMss=
867867
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
868-
github.com/urfave/cli/v3 v3.1.1 h1:bNnl8pFI5dxPOjeONvFCDFoECLQsceDG4ejahs4Jtxk=
869-
github.com/urfave/cli/v3 v3.1.1/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo=
868+
github.com/urfave/cli/v3 v3.2.0 h1:m8WIXY0U9LCuUl5r+0fqLWDhNYWt6qvlW+GcF4EoXf8=
869+
github.com/urfave/cli/v3 v3.2.0/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo=
870870
github.com/vinyldns/go-vinyldns v0.9.16 h1:GZJStDkcCk1F1AcRc64LuuMh+ENL8pHA0CVd4ulRMcQ=
871871
github.com/vinyldns/go-vinyldns v0.9.16/go.mod h1:5qIJOdmzAnatKjurI+Tl4uTus7GJKJxb+zitufjHs3Q=
872872
github.com/volcengine/volc-sdk-golang v1.0.199 h1:zv9QOqTl/IsLwtfC37GlJtcz6vMAHi+pjq8ILWjLYUc=

0 commit comments

Comments
 (0)