Closed hongshaoyang closed 5 years ago
Fix relative imports that do not work. Assuming cloning cinnabot to ~/go/src/github.com/usdevs/cinnabot, basic.go will complain:
~/go/src/github.com/usdevs/cinnabot
basic.go
cannot find package "cinnabot/model" in any of: /usr/local/go/src/cinnabot/model (from $GOROOT) /Users/shaoyang/go/src/cinnabot/model (from $GOPATH)go
Solution: Use absolute imports (import "github.com/usdevs/cinnabot" etc).
import "github.com/usdevs/cinnabot"
fixing this first, since it affects the installation in a new machine.
Fix relative imports that do not work. Assuming cloning cinnabot to
~/go/src/github.com/usdevs/cinnabot
,basic.go
will complain:Solution: Use absolute imports (
import "github.com/usdevs/cinnabot"
etc).