douzhang2092
2016-07-29 13:14 阅读 175
已采纳

如何修改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 doufeixuan8882 2016-08-04 02:27

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

    点赞 评论 复制链接分享

相关推荐