Conversation
* dotweb新增ExcludeUse接口,用于设置指定排除路由的中间件,fixed for #94 建议增加exuse方法用来实现exclude uri功能 * 调整dotweb部分内部函数名称 * 重构Middleware实现,优化代码结构,使流程更清晰 * Node新增AppMiddlewares与GroupMiddlewares,用于存储App级、Group级的中间件实例 * Middleware新增Exclude相关接口 * Exclude(routers ...string)函数,用于指定不生效的路由 * HasExclude() bool函数,用于判定当前中间件实例是否存在排除路由 * ExistsExcludeRouter(router string) bool函数,用于判定当前中间件实例的排除路由中是否存在指定路由 * middleware执行优先级: - 优先级1:app级别middleware - 优先级2:group级别middleware - 优先级:router级别middleware * 更新example/middleware * 2018-01-01 23:00:00
* Context新增QueryInt\QueryInt64接口,用于简化获取Int类型的Get参数,如果参数未传入或不是合法整形,返回0
* Context接口调整:除Write外,其他WriteXXX接口,返回值从(int, error)调整为error
* 带来的变化:
```
app.HttpServer.GET("/index", func(ctx dotweb.Context) error{
_, err := ctx.WriteString("welcome to my first web!")
return err
})
```
简化为
```
app.HttpServer.GET("/index", func(ctx dotweb.Context) error{
return ctx.WriteString("welcome to my first web!")
})
```
* 同步更新example代码
* 2018-01-03 22:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version 1.4.2
简化为