fix by golint (#1822)

This commit is contained in:
fatedier
2020-05-24 17:48:37 +08:00
committed by GitHub
parent 2170c481ce
commit 8b75b8b837
80 changed files with 1315 additions and 1324 deletions

View File

@@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestCmdTcp(t *testing.T) {
func TestCmdTCP(t *testing.T) {
assert := assert.New(t)
var err error
@@ -29,12 +29,12 @@ func TestCmdTcp(t *testing.T) {
}
time.Sleep(500 * time.Millisecond)
res, err := util.SendTcpMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR)
res, err := util.SendTCPMsg("127.0.0.1:20801", consts.TEST_TCP_ECHO_STR)
assert.NoError(err)
assert.Equal(consts.TEST_TCP_ECHO_STR, res)
}
func TestCmdUdp(t *testing.T) {
func TestCmdUDP(t *testing.T) {
assert := assert.New(t)
var err error
@@ -53,12 +53,12 @@ func TestCmdUdp(t *testing.T) {
}
time.Sleep(500 * time.Millisecond)
res, err := util.SendUdpMsg("127.0.0.1:20802", consts.TEST_UDP_ECHO_STR)
res, err := util.SendUDPMsg("127.0.0.1:20802", consts.TEST_UDP_ECHO_STR)
assert.NoError(err)
assert.Equal(consts.TEST_UDP_ECHO_STR, res)
}
func TestCmdHttp(t *testing.T) {
func TestCmdHTTP(t *testing.T) {
assert := assert.New(t)
var err error
@@ -77,7 +77,7 @@ func TestCmdHttp(t *testing.T) {
}
time.Sleep(500 * time.Millisecond)
code, body, _, err := util.SendHttpMsg("GET", "http://127.0.0.1:20001", "", nil, "")
code, body, _, err := util.SendHTTPMsg("GET", "http://127.0.0.1:20001", "", nil, "")
if assert.NoError(err) {
assert.Equal(200, code)
assert.Equal(consts.TEST_HTTP_NORMAL_STR, body)