From d3accf99135a051476cd8b505d4e8c70855e064f Mon Sep 17 00:00:00 2001 From: George Sexton Date: Sun, 6 Oct 2024 15:28:23 -0600 Subject: [PATCH] Fix lint issue --- tmp102/tmp102_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tmp102/tmp102_test.go b/tmp102/tmp102_test.go index c215fe3..9bf1927 100644 --- a/tmp102/tmp102_test.go +++ b/tmp102/tmp102_test.go @@ -110,8 +110,7 @@ func TestString(t *testing.T) { func TestSetAlertMode(t *testing.T) { ops := make([]i2ctest.IO, 0) - - for _, op := range []i2ctest.IO{ + ops = append(ops, []i2ctest.IO{ i2ctest.IO{Addr: addr, W: []byte{_REGISTER_CONFIGURATION}, R: []byte{0x00, 0x00}}, // Read the device config. i2ctest.IO{Addr: addr, W: []byte{_REGISTER_CONFIGURATION, 0x00, 0x80}}, // Set the device config. i2ctest.IO{Addr: addr, W: []byte{_REGISTER_RANGE_LOW}, R: []byte{0x4b, 0}}, // Read the low limit register @@ -124,9 +123,7 @@ func TestSetAlertMode(t *testing.T) { i2ctest.IO{Addr: addr, W: []byte{_REGISTER_RANGE_HIGH}, R: []byte{0x4f, 0x80}}, // Read the high temp register i2ctest.IO{Addr: addr, W: []byte{_REGISTER_RANGE_LOW, 0x4b, 0x00}}, // write it back to 75C i2ctest.IO{Addr: addr, W: []byte{_REGISTER_RANGE_HIGH, 0x50, 0x00}}, // set it back to 80C - } { - ops = append(ops, op) - } + }...) pb := &i2ctest.Playback{Ops: ops, DontPanic: true, Count: 1} defer pb.Close() record := &i2ctest.Record{Bus: pb}