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
parent7250a994989f44c8bc3b83f60cba564cd3c3a74e (diff)
Follow error strings convention
-rw-r--r--internal/auth/auth.go2
-rw-r--r--internal/jail/jail.go2
-rw-r--r--internal/jail/jail_test.go2
-rw-r--r--internal/netutil/shared_limit_listener.go2
-rw-r--r--internal/serving/disk/symlink/path_test.go4
-rw-r--r--internal/serving/disk/symlink/symlink.go4
-rw-r--r--internal/source/gitlab/gitlab_poll.go2
7 files changed, 9 insertions, 9 deletions
diff --git a/internal/auth/auth.go b/internal/auth/auth.go
index da35ba51..5d503799 100644
--- a/internal/auth/auth.go
+++ b/internal/auth/auth.go
@@ -540,7 +540,7 @@ func (a *Auth) GetTokenIfExists(w http.ResponseWriter, r *http.Request) (string,
session, err := a.checkSession(w, r)
if err != nil {
- return "", errors.New("Error retrieving the session")
+ return "", errors.New("error retrieving the session")
}
if session.Values["access_token"] != nil {
diff --git a/internal/jail/jail.go b/internal/jail/jail.go
index 40eb2820..4cb5765a 100644
--- a/internal/jail/jail.go
+++ b/internal/jail/jail.go
@@ -75,7 +75,7 @@ func (j *Jail) Build() error {
// Make j.mount() robust before removing this restriction, at the risk of
// extreme data loss
if len(j.bindMounts) > 1 {
- return fmt.Errorf("BUG: jail does not currently support multiple bind mounts")
+ return fmt.Errorf("bug: jail does not currently support multiple bind mounts")
}
for _, dir := range j.directories {
diff --git a/internal/jail/jail_test.go b/internal/jail/jail_test.go
index bf374a24..2ccd0bc8 100644
--- a/internal/jail/jail_test.go
+++ b/internal/jail/jail_test.go
@@ -186,7 +186,7 @@ func TestJailWithFiles(t *testing.T) {
}
for _, file := range test.files {
if err := cage.Copy(file); err != nil {
- t.Errorf("Can't prepare copy of %s inside the jail. %s", file, err)
+ t.Errorf("can't prepare copy of %s inside the jail. %s", file, err)
}
}
diff --git a/internal/netutil/shared_limit_listener.go b/internal/netutil/shared_limit_listener.go
index 130b4f02..c4c66963 100644
--- a/internal/netutil/shared_limit_listener.go
+++ b/internal/netutil/shared_limit_listener.go
@@ -10,7 +10,7 @@ import (
)
var (
- errKeepaliveNotSupported = errors.New("Keepalive not supported")
+ errKeepaliveNotSupported = errors.New("keepalive not supported")
)
// SharedLimitListener returns a Listener that accepts simultaneous
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)
diff --git a/internal/source/gitlab/gitlab_poll.go b/internal/source/gitlab/gitlab_poll.go
index 117216d7..a2a7e5f0 100644
--- a/internal/source/gitlab/gitlab_poll.go
+++ b/internal/source/gitlab/gitlab_poll.go
@@ -33,7 +33,7 @@ func (g *Gitlab) poll(interval, maxElapsedTime time.Duration) {
err := backoff.Retry(operation, backOff)
if err != nil {
- log.WithError(err).Errorf("Failed to connect to the internal GitLab API after %.2fs", maxElapsedTime.Seconds())
+ log.WithError(err).Errorf("failed to connect to the internal GitLab API after %.2fs", maxElapsedTime.Seconds())
return
}