I’m new to Go, and currently working through some textbooks I’ve bought on the topic. I use BitDefender Antivirus and it seems to be intermittently flagging go-build files as a Virus, giving this information:
“The file C:UsersMarcusAppDataLocalTempgo-build591304050b001exee211.exe is infected with Gen:Variant.Tedy.601131. The threat has been successfully blocked, your device is safe”
This happens when I run go run main.go
in my gitbash console. What is the workaround? Go creates a new directory in AppDataLocalTemp each time the command is ran, so I’m wary to add the entire Temp folder as an exclusion in my antivirus.
I tried to set the go env variable GOBIN to a directory called “GOTMPDIR” within Temp.
cmd
set GOBIN=C:GOTMPDIR
This did not change the go env variable and when its value is checked with go env GOBIN
it prints an empty line.
mikegami is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.