Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
10 changes: 5 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...),
Expand All @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
Loading