Closed
Description
What version of Go are you using (go version
)?
go version go1.10.4 linux/amd64
Does this issue reproduce with the latest release?
Not sure, the error is too rare for me but it seems the reason of the error is easy to discern.
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vadmeste/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vadmeste/work/gospace"
GOPROXY=""
GORACE=""
GOROOT="/home/vadmeste/work/go"
GOTMPDIR=""
GOTOOLDIR="/home/vadmeste/work/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/mnt/p4/vadmeste/tmp/go-build653380043=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Still, the error is so rare to be reproduced but it seems the reason of the error is easy to discern.
What did you expect to see?
No panic
What did you see instead?
panic: runtime error: comparing uncomparable type minio.ErrorResponse
goroutine 352943 [running]:
net/http.(*Request).write(0xc4229baf00, 0xcadce0, 0xc42179c840, 0x0, 0x0, 0x0, 0xcaf100, 0xc4208d4280)
/opt/go/src/net/http/request.go:624 +0x71b
net/http.(*persistConn).writeLoop(0xc421cf3200)
/opt/go/src/net/http/transport.go:1825 +0x1ea
created by net/http.(*Transport).dialConn
/opt/go/src/net/http/transport.go:1238 +0x97f
More information
The following is the definition of minio.ErrorResponse (https://github.com/minio/minio-go/blob/master/api-error-response.go#L38)
// ErrorResponse - Is the typed error returned by all API operations.
type ErrorResponse struct {
XMLName xml.Name `xml:"Error" json:"-"`
Code string
Message string
BucketName string
Key string
RequestID string `xml:"RequestId"`
HostID string `xml:"HostId"`
// Region where the bucket is located. This header is returned
// only in HEAD bucket and ListObjects response.
Region string
// Underlying HTTP status code for the returned error
StatusCode int `xml:"-" json:"-"`
// Headers of the returned S3 XML error
Headers http.Header `xml:"-" json:"-"`
}