I am trying to run my Go tests like this, setting an environment variable:
FOO=BAR go list ./... | grep -v vendor | xargs -n1 go test -timeout=3s
Inside my tests I do:
log.Print(os.Getenv("FOO"))
Which returns an empty string. Why is FOO not set?