Skip to content

Commit

Permalink
use the version of Go in go.mod for staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Oct 28, 2023
1 parent e2164af commit 539b40f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/reviewdog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: misspell
uses: reviewdog/action-misspell@v1
with:
Expand Down
5 changes: 2 additions & 3 deletions atom/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var debugLogger = sync.OnceValue(func() *slog.Logger {

func (c *Client) http(method, url string, body io.Reader) (resp *http.Response, err error) {
if blogsyncDebug {
var reqBody, resBody string
var reqBody string
if body != nil {
bb, err := io.ReadAll(body)
if err != nil {
Expand All @@ -135,14 +135,13 @@ func (c *Client) http(method, url string, body io.Reader) (resp *http.Response,
return
}
resp.Body = io.NopCloser(bytes.NewReader(bb))
resBody = string(bb)

debugLogger().Debug("traceDump",
slog.String("method", method),
slog.String("url", url),
slog.String("request", reqBody),
slog.Int("status", resp.StatusCode),
slog.String("response", resBody))
slog.String("response", string(bb)))
}()
}

Expand Down

0 comments on commit 539b40f

Please sign in to comment.