Skip to content

failed to link __xgo_link_get_pc_name(requires xgo) #292

Open
@saoDiSengTank

Description

Hi Team,

我第一次运行mock.Patch方法,报错 failed to link __xgo_link_get_pc_name(requires xgo)是什么问题?
下面是我的代码,就是一个简单的测试:
func TestSendRequest(t *testing.T) {
patches := gomonkey.NewPatches()
defer patches.Reset()
mock.Patch(aaa, func() (string, error) {
return "asdacdcs", errors.New("testawdwex")
})
s, err := aaa()
fmt.Println("ssad", err)
fmt.Println("cweD", s)
panic("test")
}

func aaa() (string, error) {
return "", nil
}

M1 Pro 芯片,系统是 15.1.1 (24B91)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions