When running go get
from a Cygwin shell on Windows using git
from Cygwin, you will see:
$ go get github.com/golang/example/hello
# cd .; git clone https://github.com/golang/example C:\tools\cygwin\home\friebe\devel\go\src\github.com\golang\example
Klone nach 'C:\tools\cygwin\home\friebe\devel\go\src\github.com\golang\example' ...
fatal: Invalid path '/home/friebe/C:\tools\cygwin\home\friebe\devel\go\src\github.com\golang\example': No such file or directory
package github.com/golang/example/hello: exit status 128
To fix this, place this file in ~/bin, run go build -o git.exe git.go
and add $HOME/bin
to the front of your $PATH environment variable.
See golang/go#23155