One of the tools I use (godog) has a dependency on go-cleanhttp. I’m getting the following error when I try to compile the code
failed to compile package steps:
# github.com/hashicorp/go-cleanhttp
/go/src/github.com/hashicorp/go-cleanhttp/cleanhttp.go:29: unknown http.Transport field 'DialContext' in struct literal
/go/src/github.com/hashicorp/go-cleanhttp/cleanhttp.go:30: unknown http.Transport field 'MaxIdleConns' in struct literal
/go/src/github.com/hashicorp/go-cleanhttp/cleanhttp.go:31: unknown http.Transport field 'IdleConnTimeout' in struct literal
I’m using go version go1.8.1 linux/amd64. If I open the source code in my IDE there are no compilation errors. It also appears to have no issues on my other PC which uses go version go1.8 linux/amd64 (although this may not be related)
As mentioned - this is not a library I’ve chosen myself however I have removed and reinstalled just in case - no success. Can anyone offer any advice on how to resolve or workaround?
I mentioned in my first post. It happens on compilation or more often trying to run the godog BDD tests. It may be an issue with godog but the error suggests that the http.transport is not picking up the new API (which is why I know you asked about the version)
There is nothing in your first post or here that lets me reproduce what you’re doing. Maybe you’re running some script that’s using Docker to build using an older compiler. Maybe there’s a vendored http library in the way. Maybe something entirely different. We can’t know, so we can’t help you.
Those guys are all using old compilers. You could point to the code you are trying to compile and show the commands you are running, but sure, let us know when it’s figured out.