How to successfully run Golang program with an http.Get calls – On Windows with MalwareBytes running?

huangapple go评论83阅读模式
英文:

How to successfully run Golang program with an http.Get calls - On Windows with MalwareBytes running?

问题

ETA. 好的,根据我收到的一些建议,我使用了"go build main.go"而不是"go run main.go"。

这将把main.exe放在我的项目文件夹中(我已经排除在外),而不是将临时的main.exe放在临时文件夹中(这将是一个不好的文件夹,不应该在你的杀毒软件中排除)。

现在可以运行了。


这个问题是给那些在Windows上安装了MalwareBytes的Golang开发人员的。
欢迎其他安装了MalwareBytes和GO的操作系统用户回答!

你能运行一个带有http调用的简单程序吗?

请参阅以下链接获取更多详细信息:
https://stackoverflow.com/questions/72606594/go-program-exits-with-no-output-if-it-has-a-simple-http-get-call

正如我在之前的问题中提到的,问题出在我的杀毒软件(MalwareBytes)上。

我仍在与MalwareBytes解决这个问题...但我想知道是否还有其他人能够让使用http方法的Golang程序与MalwareBytes正常运行,尤其是在Windows上。

如果你能够正常运行,你是否使用了任何排除项?如果有,是哪些?我已经在我的Program Files文件夹中排除了Golang文件夹和我的项目代码文件夹,但没有起作用。

感谢任何见解!

英文:

ETA. Okay, based on some advice I'd received, I used go build main.go rather than go run main.go

This puts the main.exe in my project folder (which I excluded) rather than putting a temporary main.exe in the Temp Folder (which would be bad folder to exclude in your AV.)

Able to run now.


This question is for any Golang developers who work on Windows and have MalwareBytes installed.
(Answers from other OS users who have MalwareBytes and GO installed welcome!)

Can you run a simple program with an http call?

See this for more details:
https://stackoverflow.com/questions/72606594/go-program-exits-with-no-output-if-it-has-a-simple-http-get-call

As I mentioned in the closed question - the problem was my antivirus (MalwareBytes)

I'm still working with MalwareBytes on the issue...but I wanted to see if anyone else is currently able to get a http-method-using Golang program to play nice with MalwareBytes, especially on Windows.

If you are, are you using any exclusions and if so, which ones? I excluded the Golang folder in my Program Files, and the folder with my project code, but it doesn't help.

Thanks for any insight!

答案1

得分: 0

好的,根据我收到的一些建议,我使用了go build main.go而不是go run main.go

这样会将main.exe放在我的项目文件夹中(我已经排除在外),而不是将临时的main.exe放在临时文件夹中(在防病毒软件中排除该文件夹是不好的)。

这样做后,我可以在我的项目文件夹中运行新构建的exe文件。

现在可以运行了。

英文:

Okay, based on some advice I'd received, I used go build main.go rather than go run main.go.

This puts the main.exe in my project folder (which I excluded) rather than putting a temporary main.exe in the Temp Folder (which would be bad folder to exclude in your AV.)

When I do that, I can run the newly built exe in my project folder.

Able to run now.

huangapple
  • 本文由 发表于 2022年6月17日 00:03:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/72648784.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定