The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
blackcurrant

如何在已有项目中添加 go 代码?

  •  
  •   blackcurrant · Jun 13, 2019 · 2956 views
    This topic created in 2705 days ago, the information mentioned may be changed or developed.
    刚接触 golang。我知道 go 有个工作空间的感念,需要把所有的 go 源代码文件放在 $GOPATH/src 目录下。但我有个不是用 go 写的项目,现在想把其中一个服务用 go 写。项目目录在 $GOPATH 之外,如果我按照下面的方式组织代码,如何才能使用 go tool 进行编译呢?

    /myproject/
    ├── redis
    ├── python
    ├── gocode
    2 replies  •  2019-06-13 10:12:31 +08:00
    3CH0
    3CH0
    Jun 13, 2019
    1
    go mod
    zsc8917zsc
    zsc8917zsc
    Jun 13, 2019
    2
    自己改下 GOPATH
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1493 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 14:54 · PVG 22:54 · LAX 06:54 · JFK 09:54
    ♥ Do have faith in what you're doing.