Import local package that's already in public repo

前端 未结 1 1291
一个人的身影
一个人的身影 2021-01-27 09:23

I am working on building a web framework in Go. I have the code locally and would like to use that repo in another module to test that everything works without having to create

相关标签:
1条回答
  • 2021-01-27 09:49

    When you want to use a local module instead of a remote one, you can achieve that with the replace directive.

    In your case, add this to your go.mod file:

    replace github.com/garrettlove8/goserve => ../goworkspace/src/github.com/garrettlove8/goserve
    
    0 讨论(0)
提交回复
热议问题