Fix typos and warnings for GoReport / GolangCiLinter (#132)

- typos
- gofmt -s
- govet warnings
- golangci-lint run
This commit is contained in:
Evgeniy Kulikov 2019-02-09 18:53:58 +03:00 committed by fabwa
parent d183ea3c1f
commit 630919bf7d
24 changed files with 70 additions and 65 deletions

View file

@ -7,6 +7,7 @@ import (
"net/http"
"net/http/httptest"
"strconv"
"strings"
"testing"
"github.com/CityOfZion/neo-go/config"
@ -108,9 +109,7 @@ func TestHandler(t *testing.T) {
for _, tc := range testCases {
t.Run(fmt.Sprintf("method: %s, rpc call: %s", tc.method, tc.rpcCall), func(t *testing.T) {
jsonStr := []byte(tc.rpcCall)
req := httptest.NewRequest("POST", "http://0.0.0.0:20333/", bytes.NewBuffer(jsonStr))
req := httptest.NewRequest("POST", "http://0.0.0.0:20333/", strings.NewReader(tc.rpcCall))
req.Header.Set("Content-Type", "application/json")
w := httptest.NewRecorder()