Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
二次元的罪恶王冠
beego
提交
359ad7a8
B
beego
项目概览
二次元的罪恶王冠
/
beego
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
beego
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
359ad7a8
编写于
11月 25, 2020
作者:
M
Ming Deng
提交者:
GitHub
11月 25, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4323 from flycash/fix4298
Update doc & update default conf path
上级
05d8e293
00ed1c37
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
5 deletion
+18
-5
README.md
README.md
+17
-2
core/config/global.go
core/config/global.go
+0
-1
core/config/ini.go
core/config/ini.go
+1
-1
server/web/router.go
server/web/router.go
+0
-1
未找到文件。
README.md
浏览文件 @
359ad7a8
...
...
@@ -4,7 +4,22 @@
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.
###### 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
...
...
@@ -25,7 +40,7 @@ It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific feature
#### Download and install
go get github.com/astaxie/beego
go get
-u
github.com/astaxie/beego
#### Create file `hello.go`
```
go
...
...
core/config/global.go
浏览文件 @
359ad7a8
...
...
@@ -18,7 +18,6 @@ package config
// for most users, they only need to use those methods
var
globalInstance
Configer
// InitGlobalInstance will ini the global instance
// If you want to use specific implementation, don't forget to import it.
// e.g. _ import "github.com/astaxie/beego/core/config/etcd"
...
...
core/config/ini.go
浏览文件 @
359ad7a8
...
...
@@ -519,7 +519,7 @@ func (c *IniConfigContainer) Unmarshaler(prefix string, obj interface{}, opt ...
func
init
()
{
Register
(
"ini"
,
&
IniConfig
{})
err
:=
InitGlobalInstance
(
"ini"
,
"conf
ig
/app.conf"
)
err
:=
InitGlobalInstance
(
"ini"
,
"conf/app.conf"
)
if
err
!=
nil
{
logs
.
Warn
(
"init global config instance failed. If you donot use this, just ignore it. "
,
err
)
}
...
...
server/web/router.go
浏览文件 @
359ad7a8
...
...
@@ -273,7 +273,6 @@ func (p *ControllerRegister) Include(cList ...ControllerInterface) {
for
_
,
f
:=
range
a
.
Filters
{
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
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录