Windows 无法生成EPERM的vscode上的go lang发生错误
我正在使用Windows10和vscode。 我在尝试启动时看到以下错误消息: “无法继续:错误生成EPERM” 这是我的代码和launch.jsonWindows 无法生成EPERM的vscode上的go lang发生错误,windows,go,visual-studio-code,Windows,Go,Visual Studio Code,我正在使用Windows10和vscode。 我在尝试启动时看到以下错误消息: “无法继续:错误生成EPERM” 这是我的代码和launch.json package main import ( "fmt" "net/http" ) //Hello is Http receiver type Hello struct{} func (h Hello) ServeHTTP( w http.ResponseWriter, r *http.Request) {
package main
import (
"fmt"
"net/http"
)
//Hello is Http receiver
type Hello struct{}
func (h Hello) ServeHTTP(
w http.ResponseWriter,
r *http.Request) {
fmt.Fprint(w, "Hello!")
}
func main2() {
var h Hello
http.ListenAndServe("localhost:4000", h)
}
这是我的launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
"env": {},
"args": []
}
]
}