Skip to content

Commit b9c0d6a

Browse files
Adam SussmanPettitWesley
authored andcommitted
return differentiated error code for case of slice not really a slice
Signed-off-by: Adam Sussman <[email protected]>
1 parent d58ef6b commit b9c0d6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

output/decoder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func GetRecord(dec *FLBDecoder) (ret int, ts interface{}, rec map[interface{}]in
7878

7979
slice := reflect.ValueOf(m)
8080
if slice.Kind() != reflect.Slice || slice.Len() != 2 {
81-
return -1, 0, nil
81+
return -2, 0, nil
8282
}
8383

8484
t := slice.Index(0).Interface()

0 commit comments

Comments
 (0)