oauth2 icon indicating copy to clipboard operation
oauth2 copied to clipboard

Error: duplicate new variable declaration breaks go install

Open inertica opened this issue 4 years ago • 3 comments

Building from the latest master branch produces an error:

/go/src/github.com/go-oauth2/oauth2/server/server.go:243:6: no new variables on left side of :=

The failing build command on the build pipeline:

go get -t ./...     && go vet ./...     && go test ./...     && go install ./cmd/...

Can reproduce the error on local development by updating the package and using Go version 1.14.10 by running only go install ./cmd/... command.

inertica avatar Jul 01 '21 07:07 inertica

https://github.com/go-oauth2/oauth2/blob/68172d1c8345fba702886d91c1945d68df3397b3/server/server.go#L215 https://github.com/go-oauth2/oauth2/blob/68172d1c8345fba702886d91c1945d68df3397b3/server/server.go#L243

variable tgr defined twice in same function

qinxin0720 avatar Jul 01 '21 07:07 qinxin0720

such mistake should have caught during compile time itself, does that mean it's been released without testing properly?

MilanSavaliya avatar Jul 02 '21 09:07 MilanSavaliya

see https://github.com/go-oauth2/oauth2/pull/186

Cyberhan123 avatar Jul 03 '21 07:07 Cyberhan123