Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Feb 3, 2023
1 parent 675f518 commit 028d821
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ linters-settings:
disabled: true
- name: cyclomatic
disabled: true
- name: early-return

This comment has been minimized.

Copy link
@leonklingele

leonklingele Feb 10, 2023

Member

@ReneWerner87 what was the problem here?

This comment has been minimized.

Copy link
@ReneWerner87

ReneWerner87 Mar 6, 2023

Author Member

good question, unfortunately I no longer know

severity: warning
disabled: true
- name: exported
disabled: true
- name: file-header
Expand Down
8 changes: 4 additions & 4 deletions middleware/favicon/favicon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

This comment has been minimized.

Copy link
@leonklingele

leonklingele Feb 10, 2023

Member

Why did this find its way back?

This comment has been minimized.

Copy link
@ReneWerner87

ReneWerner87 Mar 6, 2023

Author Member

because we want every configuration object to be json output capable, so we put the json configuration everywhere


// 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
Expand Down
2 changes: 1 addition & 1 deletion path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 028d821

Please sign in to comment.