douzhang2092 2016-07-29 13:14
浏览 370
已采纳

如何修改beego项目的目录结构?

bee   :1.4.1
beego :1.6.1
Go    :go version go1.6.3 windows/amd64

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\GoSites
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GO15VENDOREXPERIMENT=1
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

I am busy using the Beego framework for golang, and I am trying to modify the directory structure.

I moved the controllers, models, static, and views directories into a new directory 'app' in order to clean up the directory structure, this caused a number of routing and file path errors eg:

can't find templatefile in the path:index.tpl

How do I modify the project to account for the changing of the directory structure without causing errors?

Thanks

  • 写回答

1条回答 默认 最新

  • doufeixuan8882 2016-08-04 02:27
    关注

    Try this beego.ViewsPath = "app/views".

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

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!