1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-14 14:15:01 +00:00

🔥 Deprecate ETag option and bump version to 2.1.0

This commit is contained in:
kiyon 2020-10-15 16:53:29 +08:00
parent d4e604f1a3
commit a586bec2f9

9
app.go
View File

@ -31,7 +31,7 @@ import (
)
// Version of current fiber package
const Version = "2.0.6"
const Version = "2.1.0"
// Map is a shortcut for map[string]interface{}, useful for JSON returns
type Map map[string]interface{}
@ -314,6 +314,13 @@ func New(config ...Config) *App {
if len(config) > 0 {
app.config = config[0]
}
if app.config.ETag {
if !IsChild() {
fmt.Println("[Warning] Config.ETag is deprecated since v2.0.6, please use 'middleware/etag'.")
}
}
// Override default values
if app.config.BodyLimit <= 0 {
app.config.BodyLimit = DefaultBodyLimit