I get: brandmauer has been blocked some functions ot the program. Then I hit “Allow” for the current run and the iisue is solved, but next time I run the same program and it blocked again.
I do not know anything about Brandmauer. But most personal firewalls do exclusion rules on the path of the binary, everyone you use go run the path were the binary will be written to and then run will be different.
If though you use go build and then run your binary from were it was build to, you have a static path which remains the same each time. Then your firewall should recognize the exception rule you added (if you did so permanently) and let it run.
It is the windows firewall which asks if it is ok to make an exception for a program listening on a port. Instead of using http.ListenAndServe(":80", nil) can one listen only on localhost/127.0.0.1 while development. Like this http.ListenAnServe(“127.0.0.1:80”, nil)