mirror of
https://github.com/go-acme/lego.git
synced 2024-12-23 01:07:23 +02:00
chore: update linter
This commit is contained in:
parent
5ab212cf8d
commit
501aded55b
2
.github/workflows/pr.yml
vendored
2
.github/workflows/pr.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
GO_VERSION: stable
|
GO_VERSION: stable
|
||||||
GOLANGCI_LINT_VERSION: v1.59.1
|
GOLANGCI_LINT_VERSION: v1.60.1
|
||||||
HUGO_VERSION: 0.131.0
|
HUGO_VERSION: 0.131.0
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
LEGO_E2E_TESTS: CI
|
LEGO_E2E_TESTS: CI
|
||||||
|
@ -36,7 +36,7 @@ func NewClient(token string) *Client {
|
|||||||
|
|
||||||
// UpdateTxtRecord Update the domains TXT record
|
// UpdateTxtRecord Update the domains TXT record
|
||||||
// To update the TXT record we just need to make one simple get request.
|
// To update the TXT record we just need to make one simple get request.
|
||||||
func (c Client) UpdateTxtRecord(ctx context.Context, fqdn, txt string, clear bool) error {
|
func (c Client) UpdateTxtRecord(ctx context.Context, fqdn, txt string, clearRecord bool) error {
|
||||||
endpoint := c.baseURL.JoinPath("letsencrypt")
|
endpoint := c.baseURL.JoinPath("letsencrypt")
|
||||||
|
|
||||||
query := endpoint.Query()
|
query := endpoint.Query()
|
||||||
@ -44,7 +44,7 @@ func (c Client) UpdateTxtRecord(ctx context.Context, fqdn, txt string, clear boo
|
|||||||
query.Set("domain", dns01.UnFqdn(fqdn))
|
query.Set("domain", dns01.UnFqdn(fqdn))
|
||||||
|
|
||||||
// api call differs per set/delete
|
// api call differs per set/delete
|
||||||
if clear {
|
if clearRecord {
|
||||||
query.Set("action", "delete")
|
query.Set("action", "delete")
|
||||||
} else {
|
} else {
|
||||||
query.Set("value", txt)
|
query.Set("value", txt)
|
||||||
|
@ -43,7 +43,7 @@ func (c Client) RemoveTXTRecord(ctx context.Context, domain string) error {
|
|||||||
// UpdateTxtRecord Update the domains TXT record
|
// UpdateTxtRecord Update the domains TXT record
|
||||||
// To update the TXT record we just need to make one simple get request.
|
// To update the TXT record we just need to make one simple get request.
|
||||||
// In DuckDNS you only have one TXT record shared with the domain and all subdomains.
|
// In DuckDNS you only have one TXT record shared with the domain and all subdomains.
|
||||||
func (c Client) UpdateTxtRecord(ctx context.Context, domain, txt string, clear bool) error {
|
func (c Client) UpdateTxtRecord(ctx context.Context, domain, txt string, clearRecord bool) error {
|
||||||
endpoint, _ := url.Parse(defaultBaseURL)
|
endpoint, _ := url.Parse(defaultBaseURL)
|
||||||
|
|
||||||
mainDomain := getMainDomain(domain)
|
mainDomain := getMainDomain(domain)
|
||||||
@ -54,7 +54,7 @@ func (c Client) UpdateTxtRecord(ctx context.Context, domain, txt string, clear b
|
|||||||
query := endpoint.Query()
|
query := endpoint.Query()
|
||||||
query.Set("domains", mainDomain)
|
query.Set("domains", mainDomain)
|
||||||
query.Set("token", c.token)
|
query.Set("token", c.token)
|
||||||
query.Set("clear", strconv.FormatBool(clear))
|
query.Set("clear", strconv.FormatBool(clearRecord))
|
||||||
query.Set("txt", txt)
|
query.Set("txt", txt)
|
||||||
endpoint.RawQuery = query.Encode()
|
endpoint.RawQuery = query.Encode()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user