Getting a 'corrupt input' when trying to run a simple http.Get

I’m trying to do something very simple. I want to get text from some page. So I tried using net/http and io/ioutil but right away I started getting a weird error. Here is a gist that contains the code as well as the error I’m seeing and how I’m trying to run the program.
I have no idea what’s happening here. I know that my GOPATH and general dev environment is in working order, as every other program I’ve run has worked without issue.
OS information:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily

go env output also contained in the gist

Try removing the pkg folder. This has worked numerous times for me

The pkg folder itself or its contents?

I already tried deleting its contents.

Once I delete the folder what will trigger it’s being created again, or do I do that manually?

I removed the pkg folder, reran the program, same deal. Pkg directory stayed gone, don’t know how it’s supposed to get recreated.

Go wants to recompile the math/big package because the time stamps seem to have changed on disk, but your user doesn’t have write permissions to /usr/local/go so it can’t proceed. You don’t say what version of Go, but a go install -v -a std as a user with write permissions there might help.

(I see no relation between the error in the gist and the topic title, but maybe something changed since?)

1 Like

This fixed it! Thank you so much! I was about to blow away the whole environment and reinstall. Thanks man you’re a lifesaver! :grin: :grin: :grin:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.