Skip to content

Commit ab26e8d

Browse files
committed
go fmt
1 parent bd61238 commit ab26e8d

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

rcon_mockserver_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,7 @@ func (s *MockServer) handle(conn net.Conn) {
155155

156156
responseBody = request.Body()
157157
case "padding":
158-
response := NewPacket(responseType, responseID, responseBody)
159-
if err := s.writeWithInvalidPadding(conn, responseID, response); err != nil {
160-
s.reportError(fmt.Errorf("handle write response error: %s", err))
161-
}
162-
158+
_ = s.writeWithInvalidPadding(conn, responseID, NewPacket(responseType, responseID, responseBody))
163159
return
164160
default:
165161
responseBody = "unknown command"

rcon_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package rcon
22

33
import (
4+
"encoding/json"
45
"fmt"
56
"os"
7+
"strings"
68
"testing"
79
"time"
810

9-
"encoding/json"
1011
"github.com/stretchr/testify/assert"
11-
"strings"
1212
)
1313

1414
func TestDial(t *testing.T) {

0 commit comments

Comments
 (0)