【go】bee创建api应用遇到的问题

1:用bee api创建项目

api socialbatenews -conn="root:[email protected](127.0.0.1:3306)/spider?charset=utf8"

2:成功后我cd到目录进行run遇到如下问题

Last login: Sat Jul 2 10:14:43 on ttys000

apples-MacBook-Pro:~ carlos$ cd /Users/apple/Documents/gostud/src/github.com/socialbatenews/

apples-MacBook-Pro:socialbatenews carlos$ ls

conf docs models tests

controllers main.go routers

apples-MacBook-Pro:socialbatenews carlos$ bee run

-bash: bee: command not found

apples-MacBook-Pro:socialbatenews carlos$ source .bash_profile

-bash: .bash_profile: No such file or directory

apples-MacBook-Pro:socialbatenews carlos$ cd ~

apples-MacBook-Pro:~ carlos$ source .bash_profile

apples-MacBook-Pro:~ carlos$ cd /Users/apple/Documents/gostud/src/github.com/socialbatenews/

apples-MacBook-Pro:socialbatenews carlos$ bee run

bee :1.4.1

beego :1.6.1

Go :go version go1.6.2 darwin/amd64

2016/07/02 10:29:33 [INFO] Uses 'socialbatenews' as 'appname'

2016/07/02 10:29:33 [INFO] Initializing watcher...

2016/07/02 10:29:33 [TRAC] Directory(/Users/apple/Documents/gostud/src/github.com/socialbatenews/controllers)

2016/07/02 10:29:33 [TRAC] Directory(/Users/apple/Documents/gostud/src/github.com/socialbatenews)

2016/07/02 10:29:33 [TRAC] Directory(/Users/apple/Documents/gostud/src/github.com/socialbatenews/models)

2016/07/02 10:29:33 [TRAC] Directory(/Users/apple/Documents/gostud/src/github.com/socialbatenews/routers)

2016/07/02 10:29:33 [INFO] Start building...

main.go:4:2: no buildable Go source files in /Users/apple/Documents/gostud/src/github.com/socialbatenews/docs

2016/07/02 10:29:33 [ERRO] ============== Build failed ===================

我的相关环境是

go env

GOARCH="amd64"

GOBIN="/Users/apple/Documents/gostud/github.com/beego/bee"

GOEXE=""

GOHOSTARCH="amd64"

GOHOSTOS="darwin"

GOOS="darwin"

GOPATH="/Users/apple/Documents/gostud"

GORACE=""

GOROOT="/usr/local/go"

GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"

GO15VENDOREXPERIMENT="1"

CC="clang"

GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"

CXX="clang++"

CGO_ENABLED="1"

2:beeversion

apples-MacBook-Pro:socialbatenews carlos$ bee version

bee :1.4.1

beego :1.6.1

Go :go version go1.6.2 darwin/amd64

bee添加到环境变量了吗

回答

以上是 【go】bee创建api应用遇到的问题 的全部内容, 来源链接: www.h5w3.com/114290.html

回到顶部