production-ready-microservices icon indicating copy to clipboard operation
production-ready-microservices copied to clipboard

logrus dependency

Open shekodn opened this issue 5 years ago • 1 comments

In the current repository there is a dependency called logrus and it is imported from github.com/Sirupsen/logrus

However, according to logrus documentation, everything using logrus will need to use the lower-case: github.com/sirupsen/logrus. Any package that isn't, should be changed.

With that being said, can I open a PR in order to fix the issue if you consider there is one? While following the tutorial in a personal project I was having problems such as:

# github.com/shekodn/anti-fraud-api/vendor/github.com/sirupsen/logrus
vendor/github.com/sirupsen/logrus/terminal_check_bsd.go:10:12: undefined: unix.IoctlGetTermios 

Then, after making the dependency change as logrus suggested, I was able to build and run my personal project following the suggested guidelines from rumyantseva/production-ready-microservices

GO ENV

go env
GOARCH="amd64"
GOBIN="/Users/sergio/go/bin"
GOCACHE="/Users/sergio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/sergio/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.5/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/88/2y75bmr94l17tpp80zm0n2nm0000gn/T/go-build374172663=/tmp/go-build -gno-record-gcc-switches -fno-common"

shekodn avatar Jun 14 '19 00:06 shekodn

Hi @shekodn, thank you for raising this.

You are totally right, this library used to be named as github.com/Sirupsen/logrus. Some time ago the Sirupsen profile was renamed to sirupsen (and all the projects importing this library faced the problem you described). So, the right import path now is github.com/sirupsen/logrus.

Feel free to provide a PR to fix it, yeah! Thank you in advance :)

rumyantseva avatar Jun 14 '19 15:06 rumyantseva