What version of Go are you using (go version)?
$ go version
go version go1.15.6
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
C:\Projects\Go\src\testing>go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Ray\AppData\Local\go-build
set GOENV=C:\Users\Ray\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Projects\GoLib\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Projects\GoLib;C:\Projects\Go;
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Ray\AppData\Local\Temp\go-build204160270=/tmp/go-build -gno-record-gcc-switches
What did you do?
type invalidSide struct {
erroneousSide float64
errorMessage string
}
func (invalidSide *invalidSide) Error() string {
format := "%v given for one of the sides. values must be more than 0."
return fmt.Sprintf(format, invalidSide)
return fmt.Sprintf("%v given for one of the sides. values must be more than 0.", invalidSide)
}
Here is a sample of the code that resulted in a small issue I noticed.
What did you expect to see?
The first return statement should be flagged out by Go-Vet as it results in recursive Error calls.
What did you see instead?
The file saved without issue and crashes during run time. The 2nd return statement is able to be detected by Go-Vet perfectly fine.
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
Here is a sample of the code that resulted in a small issue I noticed.
What did you expect to see?
The first return statement should be flagged out by Go-Vet as it results in recursive Error calls.
What did you see instead?
The file saved without issue and crashes during run time. The 2nd return statement is able to be detected by Go-Vet perfectly fine.