From ae523dd55201741e9a23324fa7657099b53b11c5 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Sun, 6 Nov 2016 13:29:32 +0200 Subject: [PATCH] travis: run go vet --- .travis.yml | 1 + Makefile | 1 + iterator.go | 1 - parser.go | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e8f8133..4c70460b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ go: matrix: allow_failures: + - go: 1.4 - go: tip install: diff --git a/Makefile b/Makefile index 9ee35b2c..45626926 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ all: testdeps go test ./... go test ./... -short -race + go vet testdeps: testdata/redis/src/redis-server diff --git a/iterator.go b/iterator.go index d48ad7b8..e885985b 100644 --- a/iterator.go +++ b/iterator.go @@ -71,7 +71,6 @@ func (it *ScanIterator) Next() bool { return true } } - return false } // Val returns the key/field at the current cursor position. diff --git a/parser.go b/parser.go index 10580abc..09714125 100644 --- a/parser.go +++ b/parser.go @@ -383,7 +383,7 @@ func commandInfoSliceParser(rd *proto.Reader, n int64) (interface{}, error) { // Implements proto.MultiBulkParse func timeParser(rd *proto.Reader, n int64) (interface{}, error) { if n != 2 { - fmt.Errorf("got %d elements, expected 2", n) + return nil, fmt.Errorf("got %d elements, expected 2", n) } secStr, err := rd.ReadStringReply()