dongtang5776 2015-02-06 11:07
浏览 158
已采纳

Beego(Golang):在Windows中通过CLI创建新项目

I wanted to play with the Beego webframework. A simple command in the shell can setup a new project directory. If I run the following commandin Window's Powershell I get an error, because the command is unknown:

bee new beego_project

How can I register this command to make use of it?

  • 写回答

1条回答 默认 最新

  • 普通网友 2015-02-06 15:46
    关注

    Make sure your environment variables are correctly set in your Powershell setup.
    See for instance "how to modify GOPATH in powershell"

    • GOPATH needs to be set
    • %GOPAHT%\bin needs to be added to the PATH and bee must be in that folder.

    Note that you can set those variables in your %USERPROFILE%\Documents\WindowsPowerShell\Profile.ps1, which is similar to a ~\.bashrc.

    The OP adds in the comments:

    I just needed to add %GOPATH%\bin to the %PATH% variable.
    Now it works also under %GOPATH%

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题