golang vscode win 运行被防火墙拦截,每一次运行都需要确认
拦截界面
运行debug
[GIN-debug] Environment variable PORT is undefined. Using port :8080 by default
[GIN-debug] Listening and serving HTTP on :8080
此时运行的run是:
r.Run()
修改r.Run():
r.Run("127.0.0.1:8080")
运行就不再需要确认防火墙
debug:
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8080