Welcome to mirror list, hosted at ThFree Co, Russian Federation.

helpers.go « redirects « internal - gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4223faae2990e075769442ded6bfcbc8134c664e (plain)
1
2
3
4
5
6
7
8
9
10
11
package redirects

import (
	"strings"
)

// normalizePath ensures that the provided path ends with at least one trailing slash.
// Multiple trailing slashs are not trimmed.
func normalizePath(path string) string {
	return strings.TrimSuffix(path, "/") + "/"
}