I'm new to the GO programming language, what I'm trying to do is to put some items into the map and then remove one of them, when I'm trying to remove one of the items from array I'm getting the error message:
C:/Go\bin\go.exe run C:/Users/Computer/IdeaProjects/untitled1/simple.go
fork/exec C:\Users\Computer\AppData\Local\Temp\go-build143466426\command-line-arguments\_obj\exe\simple.exe: Access is denied.
the code:
package main
import "fmt"
func main(){
presAge := make(map[string] int)
presAge["test"] = 42
presAge["boom"] = 421
delete(presAge,"boom")
fmt.Println(len(presAge))
}
I can only speak for my own case. I ran into the similar error using Windows 10. After some experiments, it looks like the error came from Avira, the anti-virus software I was using. Basically, the .exe file is detected by Avira as containing the pattern of a type of virus (called HEUR/APC (Cloud) in my case), which prevents the program from executing.
After I disabled my anti-virus software, everything went back to normal.
for me I used avira just add C:\Users\Computer\AppData\Local\Temp
floder to exception folder for realtime-protection.
Solved my problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With