From 9996d9dfc02536932ac0933fb10464e1d5c72271 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Thu, 4 Jan 2018 13:52:50 +0100 Subject: [PATCH 1/2] Add golint --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1b58030..06ec86c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,7 @@ before_install: - sudo $TRAVIS_BUILD_DIR/.travis/prepare.sh "$FTP_SERVER" - sudo sysctl net.ipv6.conf.lo.disable_ipv6=0 - go get github.com/mattn/goveralls +- go get github.com/golang/lint/golint script: - goveralls -v +- golint -set_exit_status $(go list ./...) From 38ce06637b32ffd177f7755554cc9bab6f2bd319 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Thu, 4 Jan 2018 15:23:55 +0100 Subject: [PATCH 2/2] Fix golint warning --- ftp.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ftp.go b/ftp.go index d4ed100..8cd330b 100644 --- a/ftp.go +++ b/ftp.go @@ -131,11 +131,9 @@ func (c *ServerConn) Login(user, password string) error { } // Switch to UTF-8 - if err := c.setUTF8(); err != nil { - return err - } + err = c.setUTF8() - return nil + return err } // feat issues a FEAT FTP command to list the additional commands supported by