mirror of https://github.com/gofiber/fiber.git
prepare release
parent
675f5181ce
commit
028d821bea
|
@ -86,6 +86,9 @@ linters-settings:
|
||||||
disabled: true
|
disabled: true
|
||||||
- name: cyclomatic
|
- name: cyclomatic
|
||||||
disabled: true
|
disabled: true
|
||||||
|
- name: early-return
|
||||||
|
severity: warning
|
||||||
|
disabled: true
|
||||||
- name: exported
|
- name: exported
|
||||||
disabled: true
|
disabled: true
|
||||||
- name: file-header
|
- name: file-header
|
||||||
|
|
|
@ -19,23 +19,23 @@ type Config struct {
|
||||||
// File holds the path to an actual favicon that will be cached
|
// File holds the path to an actual favicon that will be cached
|
||||||
//
|
//
|
||||||
// Optional. Default: ""
|
// Optional. Default: ""
|
||||||
File string
|
File string `json:"file"`
|
||||||
|
|
||||||
// URL for favicon handler
|
// URL for favicon handler
|
||||||
//
|
//
|
||||||
// Optional. Default: "/favicon.ico"
|
// Optional. Default: "/favicon.ico"
|
||||||
URL string
|
URL string `json:"url"`
|
||||||
|
|
||||||
// FileSystem is an optional alternate filesystem to search for the favicon in.
|
// FileSystem is an optional alternate filesystem to search for the favicon in.
|
||||||
// An example of this could be an embedded or network filesystem
|
// An example of this could be an embedded or network filesystem
|
||||||
//
|
//
|
||||||
// Optional. Default: nil
|
// Optional. Default: nil
|
||||||
FileSystem http.FileSystem
|
FileSystem http.FileSystem `json:"-"`
|
||||||
|
|
||||||
// CacheControl defines how the Cache-Control header in the response should be set
|
// CacheControl defines how the Cache-Control header in the response should be set
|
||||||
//
|
//
|
||||||
// Optional. Default: "public, max-age=31536000"
|
// Optional. Default: "public, max-age=31536000"
|
||||||
CacheControl string
|
CacheControl string `json:"cache_control"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfigDefault is the default config
|
// ConfigDefault is the default config
|
||||||
|
|
2
path.go
2
path.go
|
@ -572,7 +572,7 @@ func findGreedyParamLen(s string, searchCount int, segment *routeSegment) int {
|
||||||
// check all from right to left segments
|
// check all from right to left segments
|
||||||
for i := segment.PartCount; i > 0 && searchCount > 0; i-- {
|
for i := segment.PartCount; i > 0 && searchCount > 0; i-- {
|
||||||
searchCount--
|
searchCount--
|
||||||
if constPosition := strings.LastIndex(s, segment.ComparePart); constPosition != -1 { //nolint:revive // Actually not simpler
|
if constPosition := strings.LastIndex(s, segment.ComparePart); constPosition != -1 {
|
||||||
s = s[:constPosition]
|
s = s[:constPosition]
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue