mirror of https://github.com/gofiber/fiber.git
prepare release
parent
675f5181ce
commit
028d821bea
|
@ -86,6 +86,9 @@ linters-settings:
|
|||
disabled: true
|
||||
- name: cyclomatic
|
||||
disabled: true
|
||||
- name: early-return
|
||||
severity: warning
|
||||
disabled: true
|
||||
- name: exported
|
||||
disabled: true
|
||||
- name: file-header
|
||||
|
|
|
@ -19,23 +19,23 @@ type Config struct {
|
|||
// File holds the path to an actual favicon that will be cached
|
||||
//
|
||||
// Optional. Default: ""
|
||||
File string
|
||||
File string `json:"file"`
|
||||
|
||||
// URL for favicon handler
|
||||
//
|
||||
// Optional. Default: "/favicon.ico"
|
||||
URL string
|
||||
URL string `json:"url"`
|
||||
|
||||
// FileSystem is an optional alternate filesystem to search for the favicon in.
|
||||
// An example of this could be an embedded or network filesystem
|
||||
//
|
||||
// Optional. Default: nil
|
||||
FileSystem http.FileSystem
|
||||
FileSystem http.FileSystem `json:"-"`
|
||||
|
||||
// CacheControl defines how the Cache-Control header in the response should be set
|
||||
//
|
||||
// Optional. Default: "public, max-age=31536000"
|
||||
CacheControl string
|
||||
CacheControl string `json:"cache_control"`
|
||||
}
|
||||
|
||||
// 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
|
||||
for i := segment.PartCount; i > 0 && searchCount > 0; i-- {
|
||||
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]
|
||||
} else {
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue