gpt4 book ai didi

GoLang command-line-arguments:(GoLang命令行参数:)

转载 作者:bug小助手 更新时间:2023-10-26 19:41:34 52 4
gpt4 key购买 nike



I am new to go language. When I use GoLand to compile my code, it prompts an error message: command-line-arguments: open C:\Users\Young\AppData\Local\Temp\go-build2051388383\b001\exe\a.out.exe: Access is denied.
And this is my code:

我对围棋语言还是个新手。当我使用Goland编译我的代码时,它提示一条错误消息:命令行参数:Open C:\Users\Young\AppData\Local\Temp\go-build2051388383\b001\exe\a.out.exe:访问被拒绝。这是我的代码:


package main

import (
"fmt"
"io"
"net/http"
"regexp"
)

var (
reQQEmail = `(\d+)@qq.com`
)

func GetEmail() {

resp, err := http.Get("https://tieba.baidu.com/p/6051076813?red_tag=1573533731")
HandleError(err, "http.Get url")
defer resp.Body.Close()

pageBytes, err := io.ReadAll(resp.Body)
HandleError(err, "io.ReadAll")

pageStr := string(pageBytes)
// fmt.Println(pageStr)

re := regexp.MustCompile(reQQEmail)
results := re.FindAllStringSubmatch(pageStr, -1)

for _, info := range results {
fmt.Println("email:", info[0])
fmt.Println("qq:", info[1])
}
}

func HandleError(err error, msg string) {
if err != nil {
fmt.Println(msg, err)
}
}

func main() {
GetEmail()
}

I asked chatgpt and it provided a lot of possible reasons, but I couldn't figure out where to start.

我问了Chatgpt,它提供了很多可能的原因,但我不知道从哪里开始。


更多回答

CreateProcess error=5, Access is denied.

CreateProcess错误=5,访问被拒绝。

Looks like antivirus software intervention.

看起来像是杀毒软件的干预。

Does this answer your question? Go lang access denied

这回答了你的问题吗?Go lang访问被拒绝

优秀答案推荐
更多回答

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com