mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Backport #17598 Backport #17606 Backport #17608 Backport #17609 - Since https://gitea.com/gitea/test-env/pulls/10 the golangci-lint has been upgraded and is erroring about new warnings in the code, this PR fixes those warnings.
This commit is contained in:
@@ -29,9 +29,7 @@ func endpointFromCloneURL(rawurl string) *url.URL {
|
||||
return ep
|
||||
}
|
||||
|
||||
if strings.HasSuffix(ep.Path, "/") {
|
||||
ep.Path = ep.Path[:len(ep.Path)-1]
|
||||
}
|
||||
ep.Path = strings.TrimSuffix(ep.Path, "/")
|
||||
|
||||
if ep.Scheme == "file" {
|
||||
return ep
|
||||
|
Reference in New Issue
Block a user