mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 13:05:09 +00:00
* ci: Fix linter complaint (#9645)
Fixes a very silly linter complaint that makes absolutely no sense and is blocking the merging of several PRs.
---
#### PR checklist
- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
documentation updates needed
(cherry picked from commit 83b7f4ad5b)
# Conflicts:
# .github/workflows/lint.yml
# .golangci.yml
# cmd/tendermint/commands/debug/util.go
* Resolve conflicts
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* ci: Sync golangci-lint config with main
Minus the spelling configuration that restricts spelling to US English
only.
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* Remove usage of deprecated io/ioutil package
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* Remove unused mockBlockStore
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* blockchain/v2: Remove unused method
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* Bulk fix lints
Signed-off-by: Thane Thomson <connect@thanethomson.com>
* lint: Ignore auto-generated query PEG
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -217,7 +217,7 @@ func (c *Client) Call(
|
||||
|
||||
defer httpResponse.Body.Close()
|
||||
|
||||
responseBytes, err := ioutil.ReadAll(httpResponse.Body)
|
||||
responseBytes, err := io.ReadAll(httpResponse.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read response body: %w", err)
|
||||
}
|
||||
@@ -265,7 +265,7 @@ func (c *Client) sendBatch(ctx context.Context, requests []*jsonRPCBufferedReque
|
||||
|
||||
defer httpResponse.Body.Close()
|
||||
|
||||
responseBytes, err := ioutil.ReadAll(httpResponse.Body)
|
||||
responseBytes, err := io.ReadAll(httpResponse.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read response body: %w", err)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
@@ -21,7 +21,7 @@ func TestHTTPClientMakeHTTPDialer(t *testing.T) {
|
||||
defer tsTLS.Close()
|
||||
// This silences a TLS handshake error, caused by the dialer just immediately
|
||||
// disconnecting, which we can just ignore.
|
||||
tsTLS.Config.ErrorLog = log.New(ioutil.Discard, "", 0)
|
||||
tsTLS.Config.ErrorLog = log.New(io.Discard, "", 0)
|
||||
|
||||
for _, testURL := range []string{ts.URL, tsTLS.URL} {
|
||||
u, err := newParsedURL(testURL)
|
||||
|
||||
@@ -3,7 +3,7 @@ package client
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -52,8 +52,8 @@ func NewURI(remote string) (*URIClient, error) {
|
||||
|
||||
// Call issues a POST form HTTP request.
|
||||
func (c *URIClient) Call(ctx context.Context, method string,
|
||||
params map[string]interface{}, result interface{}) (interface{}, error) {
|
||||
|
||||
params map[string]interface{}, result interface{},
|
||||
) (interface{}, error) {
|
||||
values, err := argsToURLValues(params)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to encode params: %w", err)
|
||||
@@ -76,7 +76,7 @@ func (c *URIClient) Call(ctx context.Context, method string,
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
responseBytes, err := ioutil.ReadAll(resp.Body)
|
||||
responseBytes, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read response body: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user