[英]Updating a go asset path for Git forks
So I have this line in my code:所以我的代码中有这一行:
base := build.Default.GOPATH + "/src/github.com/skuzzymiglet/point/"
Later, I use it like this:后来,我像这样使用它:
script, err := ioutil.ReadFile(base + "script.js")
The problem with this is if someone forks my repo, it will reference my assets not theirs, and possibly end up with an error.这样做的问题是,如果有人分叉我的 repo,它将引用我的资产而不是他们的资产,并可能最终出现错误。
How should I go about solving this problem?我应该如何解决这个问题?
it will reference my assets not theirs, and possibly end up with an error.它将引用我的资产而不是他们的资产,最终可能会出现错误。
Then:然后:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.