Just checking out the documentation It appears you need to just declare a buffer of style []byte and pass it to read through which is able to then study nearly that lots of people and return the quantity of characters http://golangtutorial.com/create-the-gopath-environment-variable-in-windows/