From 4eb4c1a9e1a14758e7e32150135f94622d2df90a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Jun 2025 20:10:04 +0000 Subject: [PATCH 1/2] build(deps): bump golangci/golangci-lint-action from 7 to 8 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 7 to 8. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v7...v8) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e222d4..56aff72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,6 @@ jobs: go-version: ${{ matrix.go }} cache: true - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v8 with: version: ${{ matrix.lint }} From ceadd6c80c872d328560d136fb9e4cfbec3a1a79 Mon Sep 17 00:00:00 2001 From: Francisco Delmar Kurpiel Date: Mon, 2 Jun 2025 11:31:47 +0200 Subject: [PATCH 2/2] golangci-lint v2.0.2 => v2.1.6 and go changes --- .github/workflows/ci.yml | 2 +- client.go | 10 +++++----- log/logger.go | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56aff72..73122e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: strategy: matrix: go: ["1.21", "stable"] - lint: ["v2.0.2"] + lint: ["v2.1.6"] name: lint runs-on: ubuntu-latest steps: diff --git a/client.go b/client.go index 878c667..94c946f 100644 --- a/client.go +++ b/client.go @@ -36,6 +36,11 @@ var errResponseTooLarge = retry.PermanentError{ Cause: errors.New("Response from CloudFlare is too large"), } +type Client struct { + *settings + creds Credentials +} + func NewClient(creds Credentials, options ...Option) *Client { ret := Client{ settings: applyOptions(options...), @@ -45,11 +50,6 @@ func NewClient(creds Credentials, options ...Option) *Client { return &ret } -type Client struct { - *settings - creds Credentials -} - // sendRequestRetry tries sending the request until it succeeds, fail to // many times of fails once with a permanent error. Wait between retries // use exponential backoff. diff --git a/log/logger.go b/log/logger.go index 627de96..5607da4 100644 --- a/log/logger.go +++ b/log/logger.go @@ -62,13 +62,6 @@ func (l *Logger) D(lf func(lg DebugFn)) { type DebugFn func(msg string, opt ...Option) -func (l *Logger) d(msg string, opt ...Option) { - if helper := l.driver.PreLog(); helper != nil { - helper() - } - l.log(msg, Debug, opt...) -} - func (l *Logger) I(msg string, opt ...Option) { if helper := l.driver.PreLog(); helper != nil { helper() @@ -90,6 +83,13 @@ func (l *Logger) E(msg string, opt ...Option) { l.log(msg, Error, opt...) } +func (l *Logger) d(msg string, opt ...Option) { + if helper := l.driver.PreLog(); helper != nil { + helper() + } + l.log(msg, Debug, opt...) +} + func (l *Logger) log(msg string, sev Severity, opt ...Option) { if helper := l.driver.PreLog(); helper != nil { helper()