您的位置 首页 golang

Golang 使用beego框架的Bee工具(无法下载和没有可执行文件问题


前言

这两天想着学习一下beego框架,在下载bee时遇到了问题,使用了多个方法都没解决,最后直接使用最笨的方法——下载重新编译出可执行文件,最后成功解决问题,因此在这里记载一下这个bug。

Golang使用beego框架

beego框架的中文文档,有详细的使用介绍,我就是用按着官方文档进行操作,具体操作如下:

  1. beego安装
go get github.com/astaxie/beego
  1. bee工具安装
go get github.com/beego/bee

这里下载的时候就会遇到问题,输出如下:

Golang 使用beego框架的Bee工具(无法下载和没有可执行文件问题
image

bee工具还没有支持go mod,go mod 出了这么久仍还没有支持,服气!!!
既然不支持,那么我们需要换一种方法获取beego。
新建一个目录作为Go mod项目,创建方式如下:

mkdir newprojectgo mod init newproject//然后会生成,在go.mod文件,在该文件中添加一行源码替换,我们将beego源码fork到自己的github仓库上module newprojectreplace github.com/beego/bee v1.10.0 -> github.com/sunsong2020/bee v1.12.1go 1.14

之后我们在执行 go get -u github.com/beego/bee 就可以,现在我们就成功下载了,官方文档说,下载以后会自动在GAPATH/bin下生成bee.exe可执行文件,但是我这里是没有,我寻思自己编译一下吧,但是没有编译成功,各种更改都没有成功,我服了!!!

没招了,我就用出了最后的办法,我把astaxie/beego beego/bee 使用git clone 克隆到本地了,然后把bee整个项目放到beego目录下,然后放到GOPATH/src/github.com工作区中,然后进入到bee目录执行以下命令:

go build main.go

这回终于成功了,生成了一个main.exe可执行文件,执行以下就是bee工具,现在你只需要把这个可执行文件重命名为bee.exe,然后复制粘贴到你的GOPATH/bin 路径下,添加环境变量,然后打开终端,输入bee,神奇的事情发生了,你看:

Golang 使用beego框架的Bee工具(无法下载和没有可执行文件问题
image

我是终于成功,终于可以开开心心的学习框架了,折腾了这么久,还是有一些收获的!!!

表达能力就这样了,如果你也遇到了这个问题,并且还没有看到我的博客,那么你可以联系我,我帮你看一看问题。可以关注我的公众号:[Golang梦工厂],或者扫描下图,里面有我的VX,添加我的vx,帮你解决问题。没有问题也可以关注我的公众号,主要发表关于Golang技术,共同学习进步,冲呀!!!

Golang 使用beego框架的Bee工具(无法下载和没有可执行文件问题
image

文章来源:智云一二三科技

文章标题:Golang 使用beego框架的Bee工具(无法下载和没有可执行文件问题

文章地址:https://www.zhihuclub.com/1327.shtml

关于作者: 智云科技

热门文章

评论已关闭

32条评论

  1. She said it s better not to use colchicine while taking Paxlovid, as it is contraindicated, but it can be managed in certain circumstances with substantial dose reduction

  2. Improvement in serum lipid profile in hyperlipoproteinaemic patients after treatment with pantethine a crossover, double blind trial versus placebo We used an immunocytological method monoclonal mucin antibody 2E11; the avidin biotin complex method

  3. These observations argue for a tamoxifen selective resistance mechanism that can be overcome by effective estrogen deprivation treatment Moreover, much of the completed clinical researches have focused on the lonely effect of DIM as a therapeutic or chemopreventive agent

  4. 25 para que sirve A parent group called New York State Allies for Public Education allied in New York City with the radical anti testing group Class Size Matters, seconded by state Sen

  5. Two facilities opened in Northern Virginia facilities A and B, two opened in Eastern Virginia facilities C and D, and one opened in Southwest Virginia facility E

  6. To update, I m the person who has had microcalcs since 2011 and have refused biopsy since that time, opting instead to surveil it on mammogram Taxanes also cause depletion of the follicular pool but do not cause direct vascular damage 15, 16

  7. B, C Arc Cre ERT2; Ai9; Thy1 eGFP Arc, solid circles and Nex Cre ERT2; Ai9; Thy1 eGFP Nex, open circles mice displayed increased freezing during the context B and tone C probe trials p N Arc 6, N Nex 6; 2 way ANOVA with Tukey s multiple comparisons correction

  8. A total of four cancer cell lines were used in the present study MCF 7, MDA MB 231, ZR 75 1, and U2 OS

  9. 1bn of its financingneeds, while its issuance of bonds and treasury bills amountedto EUR5

  10. Blood clots in deep veins are extremely rare after the treatment of superficial small vessels Hipolito aIpSQDVXtsChsul 6 20 2022

  11. Oral azithromycin has an anti inflammatory effect in addition to its antibacterial actions 5 billion people in the world and total production is about 125 trillion, which means that average income is about 16, 667

  12. I m trying again for reply from Dr E indinavir will increase the level or effect of pazopanib by affecting hepatic intestinal enzyme CYP3A4 metabolism

  13. Purified recombinant EBV desoxyribonuclease in serological diagnosis of nasopharyngeal carcinoma

  14. breeace For the headaches I would try chamomile tea or peppermint tea or actually my go to 20, 00 Secrets of Tea book says for migraines that feverfew and lavendar are helpful Tamoxifen 200 ОјL 10 mg mL in corn oil was administered by oral gavage

  15. Schedule your free consultation at Family Eye Physicians if you are interested in the best Lasik Chicago has to offer She believes the secret to radiant health starts and ends keto diet for acne with a healthy gut keto soup diet recipe Weight Loss Injections so all her recipes are grain, gluten and refined sugar free

  16. Effect of cytochrome P450 3A4 inhibition on the pharmacokinetics of docetaxel A randomized study of tamoxifen alone versus tamoxifen plus melatonin in estrogen receptor negative heavily pretreated metastatic breast cancer patients

  17. Drugs such as beta blockers, methysergide, and methyldopa have been implicated, possibly by acting as haptens, leading to a hypersensitivity or autoimmune reaction moxifloxacin, naproxen

  18. In fact, matcha tea has been used for centuries by Zen Buddhist monks for extended, day- long meditations to provide a calm focus

  19. Half the patients had bilateral stenosis with slightly less renal function HAPE susceptible individuals have exaggerated HPV, which likely accounts for their elevated pulmonary artery pressures; multiple studies demonstrate that HAPE susceptible individuals have abnormally high pulmonary artery pressure responses during hypoxic breathing, during normoxic and hypoxic exercise, and on ascent to high altitude before the onset of edema

  20. Burst Edition FDA approvals of Verzenio abemaciclib for adjuvant treatment of adult patients with hormone receptor positive, human epidermal growth factor receptor 2 negative, node positive, early breast cancer, Keytruda pembrolizumab for persistent, recurrent or metastatic cervical cancer whose tumors express PD L1 CPS 1

  21. A tubo ovarian abscess TOA is a complex infectious mass of the adnexa that forms as a sequela of pelvic inflammatory disease

  22. An increased incidence of exencephaly was found in the fetuses of females injected with clomiphene citrate prior to ovulation Sperm come from germ cells in small tubules within the testis

网站地图