mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 03:29:43 +02:00
Update golangci-lint to v2.6.0 (#35801)
https://github.com/golangci/golangci-lint/releases/tag/v2.6.0 - `modernize` linter is enabled, this is the same as `gopls modernize` - ~~`perfsprint` linter is disabled because it conflicts with `modernize` (maybe there is a middle ground)~~ - gocritic `deprecatedComment` is disabled as it conflicts with `go-swagger`
This commit is contained in:
1 parent
bb1f52347a
commit
850012bf5c
4 files changed
+12
-5
No files matched your search
@@ -129,8 +129,8 @@ func GitPathToWebPath(s string) (wp WebPath, err error) {
|
||||
func WebPathToUserTitle(s WebPath) (dir, display string) {
|
||||
dir = path.Dir(string(s))
|
||||
display = path.Base(string(s))
|
||||
if strings.HasSuffix(display, ".md") {
|
||||
display = strings.TrimSuffix(display, ".md")
|
||||
if before, ok := strings.CutSuffix(display, ".md"); ok {
|
||||
display = before
|
||||
display, _ = url.PathUnescape(display)
|
||||
}
|
||||
display, _ = unescapeSegment(display)
|
||||
|
||||
Reference in new issue
Block a user