From a1d328b37660b01e30813536ca86fe247cfd562d Mon Sep 17 00:00:00 2001 From: scruzin Date: Tue, 15 Jan 2019 10:04:36 +1030 Subject: [PATCH] Remove unnecessary underscores from for loops with ranges. --- rtmp/amf/amf_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rtmp/amf/amf_test.go b/rtmp/amf/amf_test.go index f8668ff6..59548c09 100644 --- a/rtmp/amf/amf_test.go +++ b/rtmp/amf/amf_test.go @@ -124,7 +124,7 @@ func TestProperties(t *testing.T) { // Encode/decode Number properties. enc := buf[:] var err error - for i, _ := range testNumbers { + for i := range testNumbers { enc, err = EncodeProperty(&Property{Type: typeNumber, Number: float64(testNumbers[i])}, enc) if err != nil { t.Errorf("EncodeProperty of Number failed") @@ -134,7 +134,7 @@ func TestProperties(t *testing.T) { prop := Property{} dec := buf[:] - for i, _ := range testNumbers { + for i := range testNumbers { n, err := DecodeProperty(&prop, dec, false) if err != nil { t.Errorf("DecodeProperty of Number failed") @@ -147,7 +147,7 @@ func TestProperties(t *testing.T) { // Encode/decode string properties. enc = buf[:] - for i, _ := range testStrings { + for i := range testStrings { enc, err = EncodeProperty(&Property{Type: typeString, String: testStrings[i]}, enc) if err != nil { t.Errorf("EncodeProperty of string failed") @@ -156,7 +156,7 @@ func TestProperties(t *testing.T) { } prop = Property{} dec = buf[:] - for i, _ := range testStrings { + for i := range testStrings { n, err := DecodeProperty(&prop, dec, false) if err != nil { t.Errorf("DecodeProperty of string failed") @@ -234,7 +234,7 @@ func TestObject(t *testing.T) { // Construct a more complicated object that includes a nested object. var obj2 Object - for i, _ := range testStrings { + for i := range testStrings { obj2.Properties = append(obj2.Properties, Property{Type: typeString, String: testStrings[i]}) obj2.Properties = append(obj2.Properties, Property{Type: typeNumber, Number: float64(testNumbers[i])}) }