mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-23 01:58:03 +08:00
enable staticcheck QFxxxx rules (#34064)
This commit is contained in:
@ -36,9 +36,10 @@ func PathJoinRel(elem ...string) string {
|
||||
elems[i] = path.Clean("/" + e)
|
||||
}
|
||||
p := path.Join(elems...)
|
||||
if p == "" {
|
||||
switch p {
|
||||
case "":
|
||||
return ""
|
||||
} else if p == "/" {
|
||||
case "/":
|
||||
return "."
|
||||
}
|
||||
return p[1:]
|
||||
|
Reference in New Issue
Block a user