We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http.Error
go version go1.21.0 darwin/arm64
go env
GO111MODULE='auto' GOARCH='arm64' GOBIN='' GOCACHE='/Users/farmer/Library/Caches/go-build' GOENV='/Users/farmer/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/farmer/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/farmer/go' GOPRIVATE='' GOPROXY='https://goproxy.cn,direct' GOROOT='/opt/homebrew/Cellar/go/1.21.0/libexec' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.0/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.21.0' GCCGO='gccgo' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOMOD='' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/8g/4qtxptcd2t936bz67vgnbmv80000gn/T/go-build3382973548=/tmp/go-build -gno-record-gcc-switches -fno-common'
When I used the http.Error method, I found that the input parameter naming conflicted with the keyword
nothing
Parameters do not conflict with keywords. like this: func Error(w ResponseWriter, errorMessage string, code int)
func Error(w ResponseWriter, errorMessage string, code int)
The text was updated successfully, but these errors were encountered:
While it shares the same name as the predeclared error type, there is no conflict in its usage.
error
Sorry, something went wrong.
No branches or pull requests
Go version
go version go1.21.0 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
When I used the
http.Error
method, I found that the input parameter naming conflicted with the keywordWhat did you see happen?
nothing
What did you expect to see?
Parameters do not conflict with keywords.
like this:
func Error(w ResponseWriter, errorMessage string, code int)
The text was updated successfully, but these errors were encountered: