From 04cdc41cc4dfc91ed91e7fa785778bf029861fdb Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Wed, 14 Sep 2016 11:00:34 +0000 Subject: [PATCH] Try to fix Go 1.4. --- .travis.yml | 1 + internal/errors/errors.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 25bce050..1d042e4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ services: - redis-server go: + - 1.4 - 1.6 - 1.7 - tip diff --git a/internal/errors/errors.go b/internal/errors/errors.go index 6d664ddf..a17a3d37 100644 --- a/internal/errors/errors.go +++ b/internal/errors/errors.go @@ -58,7 +58,7 @@ func IsMoved(err error) (moved bool, ask bool, addr string) { return } - ind := strings.LastIndexByte(s, ' ') + ind := strings.LastIndex(s, " ") if ind == -1 { return false, false, "" }