mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
fix most linter errors
This commit is contained in:
parent
3e0737a8bd
commit
9fc5066fc4
8 changed files with 57 additions and 42 deletions
|
@ -158,7 +158,8 @@ func join(base string, names ...string) (string, error) {
|
|||
// splitURLPath splits the URL path into a folderPath of the subrepo, and
|
||||
// a remainder that can be passed to repo.Handler.
|
||||
// Example: /foo/bar/locks/0123... will be split into:
|
||||
// ["foo", "bar"] and "/locks/0123..."
|
||||
//
|
||||
// ["foo", "bar"] and "/locks/0123..."
|
||||
func splitURLPath(urlPath string, maxDepth int) (folderPath []string, remainder string) {
|
||||
if !strings.HasPrefix(urlPath, "/") {
|
||||
// Really should start with "/"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue