From 2172e9384c543709081005e1cc4034c3c7d8f34f Mon Sep 17 00:00:00 2001 From: Karan Misra Date: Sun, 6 Apr 2014 04:05:18 +0530 Subject: [PATCH] gpio: cleanup test code --- gpiodriver_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gpiodriver_test.go b/gpiodriver_test.go index 61e1efc..254c4f1 100644 --- a/gpiodriver_test.go +++ b/gpiodriver_test.go @@ -43,13 +43,13 @@ func newFakeDigitalPin(n int) DigitalPin { } func TestGpioDriverDigitalPin(t *testing.T) { - var tests = []struct { + tests := []struct { key interface{} n int }{ {1, 1}, } - var pinMap = PinMap{ + pinMap := PinMap{ &PinDesc{ID: "P1_1", Aliases: []string{"1"}, Caps: CapDigital, DigitalLogical: 1}, } driver := newGPIODriver(pinMap, newFakeDigitalPin, nil, nil) @@ -90,13 +90,13 @@ func newFakeAnalogPin(n int) AnalogPin { } func TestGpioDriverAnalogPin(t *testing.T) { - var tests = []struct { + tests := []struct { key interface{} n int }{ {1, 1}, } - var pinMap = PinMap{ + pinMap := PinMap{ &PinDesc{ID: "P1_1", Aliases: []string{"1"}, Caps: CapAnalog, AnalogLogical: 1}, } driver := newGPIODriver(pinMap, nil, newFakeAnalogPin, nil) @@ -113,7 +113,7 @@ func TestGpioDriverAnalogPin(t *testing.T) { } func TestGpioDriverUnavailablePinType(t *testing.T) { - var pinMap = PinMap{ + pinMap := PinMap{ &PinDesc{ID: "P1_1", Aliases: []string{"1"}, Caps: CapDigital, DigitalLogical: 1}, &PinDesc{ID: "P1_2", Aliases: []string{"1"}, Caps: CapAnalog, AnalogLogical: 1}, }