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

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-04-22 18:53:18 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-04-22 18:53:18 +0300
commitc04f97bdbfa7ae5f1eb732791a3eaa04c8f241d6 (patch)
tree0982c2c42d1837ddf237971087cda27b9c9a773e /internal/serving
parent7250a994989f44c8bc3b83f60cba564cd3c3a74e (diff)
Follow error strings convention
Diffstat (limited to 'internal/serving')
-rw-r--r--internal/serving/disk/symlink/path_test.go4
-rw-r--r--internal/serving/disk/symlink/symlink.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/serving/disk/symlink/path_test.go b/internal/serving/disk/symlink/path_test.go
index ef9726c1..66b4fceb 100644
--- a/internal/serving/disk/symlink/path_test.go
+++ b/internal/serving/disk/symlink/path_test.go
@@ -76,11 +76,11 @@ func testEvalSymlinks(t *testing.T, wd, path, want string) {
have, err := symlink.EvalSymlinks(context.Background(), root, path)
if err != nil {
- t.Errorf("EvalSymlinks(%q) error: %v", path, err)
+ t.Errorf("evalSymlinks(%q) error: %v", path, err)
return
}
if filepath.Clean(have) != filepath.Clean(want) {
- t.Errorf("EvalSymlinks(%q) returns %q, want %q", path, have, want)
+ t.Errorf("evalSymlinks(%q) returns %q, want %q", path, have, want)
}
}
diff --git a/internal/serving/disk/symlink/symlink.go b/internal/serving/disk/symlink/symlink.go
index 3b5d242a..be9a87e0 100644
--- a/internal/serving/disk/symlink/symlink.go
+++ b/internal/serving/disk/symlink/symlink.go
@@ -59,7 +59,7 @@ func walkSymlinks(ctx context.Context, root vfs.Root, path string) (string, erro
}
if r >= 0 && r+1 == volLen && os.IsPathSeparator(dest[r]) {
- return "", errors.New("EvalSymlinks: cannot backtrack root path")
+ return "", errors.New("evalSymlinks: cannot backtrack root path")
} else if r < volLen || dest[r+1:] == ".." {
// Either path has no slashes
// (it's empty or just "C:")
@@ -102,7 +102,7 @@ func walkSymlinks(ctx context.Context, root vfs.Root, path string) (string, erro
linksWalked++
if linksWalked > 255 {
- return "", errors.New("EvalSymlinks: too many links")
+ return "", errors.New("evalSymlinks: too many links")
}
link, err := root.Readlink(ctx, dest)