Skip to content

Commit f23858c

Browse files
committed
chore: fix gofmt formatting in test files
1 parent 2783cc1 commit f23858c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

internal/modbus/server_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ func buildMBAPRequest(txID uint16, slaveID byte, funcCode byte, address uint16,
210210
binary.BigEndian.PutUint16(pdu[3:5], quantity)
211211

212212
frame := make([]byte, 7+len(pdu))
213-
binary.BigEndian.PutUint16(frame[0:2], txID) // Transaction ID
214-
binary.BigEndian.PutUint16(frame[2:4], 0) // Protocol ID (Modbus = 0)
213+
binary.BigEndian.PutUint16(frame[0:2], txID) // Transaction ID
214+
binary.BigEndian.PutUint16(frame[2:4], 0) // Protocol ID (Modbus = 0)
215215
binary.BigEndian.PutUint16(frame[4:6], uint16(len(pdu)+1)) // Length
216216
frame[6] = slaveID
217217
copy(frame[7:], pdu)

internal/proxy/proxy_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ func TestProxy_HandleWriteReadOnlyMode(t *testing.T) {
6363
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
6464

6565
tests := []struct {
66-
name string
67-
mode config.ReadOnlyMode
68-
wantExc bool // Whether to expect exception response
66+
name string
67+
mode config.ReadOnlyMode
68+
wantExc bool // Whether to expect exception response
6969
}{
7070
{"readonly on", config.ReadOnlyOn, false},
7171
{"readonly deny", config.ReadOnlyDeny, true},
@@ -138,9 +138,9 @@ func TestProxy_BuildFakeWriteResponse(t *testing.T) {
138138
p := &Proxy{}
139139

140140
tests := []struct {
141-
name string
142-
req *modbus.Request
143-
wantLen int
141+
name string
142+
req *modbus.Request
143+
wantLen int
144144
}{
145145
{
146146
name: "write single coil",

0 commit comments

Comments
 (0)