You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在项目中写一个例子尝试了下,会报错:
[2023-11-09 11:21:00,222][0 0 Error 7 1]hotfixdo.go:19 hotfix.ApplyFunc(),err=./_patch_files/patch/patch.go:8:2: import "xxx.com/root/DawnCore/basic" error: unable to find source related to: "xxx.com/root/DawnCore/basic". Either the GOPATH environment variable, or the Interpreter.Options.GoPath needs to be set
phantacix,你好:
想要替换的是业务处理的函数,它会有一些第三方的依赖,如:
github.com/golang/protobuf/proto
xxx.com/root/DawnCore/basic //自建的项目公共库,里面包含日志类
。。。
而且还用到一些全局变量,如日志,连接器对象等,xxx.com是公司域名,有点敏感,就用xxx.com代替了
在项目中写一个例子尝试了下,会报错:
[2023-11-09 11:21:00,222][0 0 Error 7 1]hotfixdo.go:19 hotfix.ApplyFunc(),err=./_patch_files/patch/patch.go:8:2: import "xxx.com/root/DawnCore/basic" error: unable to find source related to: "xxx.com/root/DawnCore/basic". Either the GOPATH environment variable, or the Interpreter.Options.GoPath needs to be set
`package patch
import (
"fmt"
"reflect"
)
func GetPatch() *hotfix.FuncPatch {
fmt.Println("invoke GetPatch()")
}
`
是我的写法不对吗?还是需要把整个xxx.com/root/DawnCore的源码都要放到patch文件夹?这样不太可取,有泄露源代码的风险
The text was updated successfully, but these errors were encountered: