beego mac在线安装

对应目录path路径下,才能安装beego,否则回报错

bogon:golang destiny$ pwd
/Users/destiny/golang

bogon:golang destiny$ go get ./src/github.com/astaxie/beego
bogon:golang destiny$ go get ./src/github.com/astaxie/beego
bogon:golang destiny$ go get ./src/githubcom/beego/bee
package githubcom/beego/bee: unrecognized import path "githubcom/beego/bee" (import path does not begin with hostname)
bogon:golang destiny$ go get ./src/github.com/beego/bee
bogon:golang destiny$ bee
Bee is a Fast and Flexible tool for managing your Beego Web Application.

USAGE
bee command [arguments]

AVAILABLE COMMANDS

version Prints the current Bee version
migrate Runs database migrations
api Creates a Beego API application
bale Transforms non-Go files to Go source files
fix Fixes your application by making it compatible with newer versions of Beego
dlv Start a debugging session using Delve
dockerize Generates a Dockerfile for your Beego application
generate Source code generator
hprose Creates an RPC application based on Hprose and Beego frameworks
new Creates a Beego application
pack Compresses a Beego application into a single file
rs Run customized scripts
run Run the application by starting a local development server
server serving static content over HTTP on port

Use bee help [command] for more information about a command.

ADDITIONAL HELP TOPICS


Use bee help [topic] for more information about that topic.
bogon:golang destiny$ bee new nyClass
______
| ___ \
| |_/ / ___ ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.10.0
2019/10/21 10:56:01 WARN ▶ 0001 You current workdir is not inside $GOPATH/src.
2019/10/21 10:56:01 INFO ▶ 0002 Creating application...
create /Users/destiny/golang/src/nyClass/
create /Users/destiny/golang/src/nyClass/conf/
create /Users/destiny/golang/src/nyClass/controllers/
create /Users/destiny/golang/src/nyClass/models/
create /Users/destiny/golang/src/nyClass/routers/
create /Users/destiny/golang/src/nyClass/tests/
create /Users/destiny/golang/src/nyClass/static/
create /Users/destiny/golang/src/nyClass/static/js/
create /Users/destiny/golang/src/nyClass/static/css/
create /Users/destiny/golang/src/nyClass/static/img/
create /Users/destiny/golang/src/nyClass/views/
create /Users/destiny/golang/src/nyClass/conf/app.conf
create /Users/destiny/golang/src/nyClass/controllers/default.go
create /Users/destiny/golang/src/nyClass/views/index.tpl
create /Users/destiny/golang/src/nyClass/routers/router.go
create /Users/destiny/golang/src/nyClass/tests/default_test.go
create /Users/destiny/golang/src/nyClass/main.go
2019/10/21 10:56:01 SUCCESS ▶ 0003 New application successfully created!
bogon:golang destiny$ cd ./src/nyClass/
bogon:nyClass destiny$ go run mian.go
stat mian.go: no such file or directory
bogon:nyClass destiny$ pwd
/Users/destiny/golang/src/nyClass
bogon:nyClass destiny$ go run main.go
2019/10/21 11:00:48.115 [I] [asm_amd64.s:2337] http server Running on http://:8080

 只有: cd $GOPATH/src  才能使用bee run 运行编译代码,自动重新check更新的代码

posted @ 2019-10-21 10:33  星云惊蛰  阅读(745)  评论(0)    收藏  举报