未验证 提交 359ad7a8 编写于 作者: M Ming Deng 提交者: GitHub

Merge pull request #4323 from flycash/fix4298

Update doc & update default conf path
...@@ -4,7 +4,22 @@ ...@@ -4,7 +4,22 @@
beego is used for rapid development of RESTful APIs, web apps and backend services in Go. beego is used for rapid development of RESTful APIs, web apps and backend services in Go.
It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific features such as interfaces and struct embedding. It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific features such as interfaces and struct embedding.
###### More info at [beego.me](http://beego.me). ###### More info at [beego.me](http://beego.me).
> If you could not open this website, go to [beedoc](https://github.com/beego/beedoc)
## beego 1.x and 2.x
We recently release beego 2.0.0-beta, and its structure change a lot, so you may get some error
1. If you are working on beego v1.x please try `go get github.com/astaxie/beego@v1.12.3`
2. If you want to try beego 2.0.0, run `go get github.com/astaxie/beego@develop`
We are still working on fix bug and documentation of v2.x. And v2.x's doc will be released with v2.0.0.
## Next version
v1.12.4 will be released on Jan 2021 And v2.0.0 will be released next month.
## Quick Start ## Quick Start
...@@ -25,7 +40,7 @@ It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific feature ...@@ -25,7 +40,7 @@ It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific feature
#### Download and install #### Download and install
go get github.com/astaxie/beego go get -u github.com/astaxie/beego
#### Create file `hello.go` #### Create file `hello.go`
```go ```go
......
...@@ -18,7 +18,6 @@ package config ...@@ -18,7 +18,6 @@ package config
// for most users, they only need to use those methods // for most users, they only need to use those methods
var globalInstance Configer var globalInstance Configer
// InitGlobalInstance will ini the global instance // InitGlobalInstance will ini the global instance
// If you want to use specific implementation, don't forget to import it. // If you want to use specific implementation, don't forget to import it.
// e.g. _ import "github.com/astaxie/beego/core/config/etcd" // e.g. _ import "github.com/astaxie/beego/core/config/etcd"
......
...@@ -519,7 +519,7 @@ func (c *IniConfigContainer) Unmarshaler(prefix string, obj interface{}, opt ... ...@@ -519,7 +519,7 @@ func (c *IniConfigContainer) Unmarshaler(prefix string, obj interface{}, opt ...
func init() { func init() {
Register("ini", &IniConfig{}) Register("ini", &IniConfig{})
err := InitGlobalInstance("ini", "config/app.conf") err := InitGlobalInstance("ini", "conf/app.conf")
if err != nil { if err != nil {
logs.Warn("init global config instance failed. If you donot use this, just ignore it. ", err) logs.Warn("init global config instance failed. If you donot use this, just ignore it. ", err)
} }
......
...@@ -273,7 +273,6 @@ func (p *ControllerRegister) Include(cList ...ControllerInterface) { ...@@ -273,7 +273,6 @@ func (p *ControllerRegister) Include(cList ...ControllerInterface) {
for _, f := range a.Filters { for _, f := range a.Filters {
p.InsertFilter(f.Pattern, f.Pos, f.Filter, WithReturnOnOutput(f.ReturnOnOutput), WithResetParams(f.ResetParams)) p.InsertFilter(f.Pattern, f.Pos, f.Filter, WithReturnOnOutput(f.ReturnOnOutput), WithResetParams(f.ResetParams))
} }
p.addWithMethodParams(a.Router, c, a.MethodParams, strings.Join(a.AllowHTTPMethods, ",")+":"+a.Method) p.addWithMethodParams(a.Router, c, a.MethodParams, strings.Join(a.AllowHTTPMethods, ",")+":"+a.Method)
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册