summaryrefslogtreecommitdiff
path: root/go/internal/command/receivepack/receivepack.go
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-06-03 15:21:25 +0000
committerNick Thomas <nick@gitlab.com>2019-06-03 15:21:25 +0000
commitcde5b73cb8776c70c6d00ff34c568ea4438bcba9 (patch)
treeddc0d81da81ebfdb2c05819c88cde2c56dbaf4d5 /go/internal/command/receivepack/receivepack.go
parentbeb5855542645cdc9bf7f954b9c5a9333dfb3975 (diff)
downloadgitlab-shell-cde5b73cb8776c70c6d00ff34c568ea4438bcba9.tar.gz
Go implementation for git-upload-pack
Diffstat (limited to 'go/internal/command/receivepack/receivepack.go')
-rw-r--r--go/internal/command/receivepack/receivepack.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/go/internal/command/receivepack/receivepack.go b/go/internal/command/receivepack/receivepack.go
index d1ff3f8..d6b788c 100644
--- a/go/internal/command/receivepack/receivepack.go
+++ b/go/internal/command/receivepack/receivepack.go
@@ -1,18 +1,13 @@
package receivepack
import (
- "errors"
-
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/commandargs"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/readwriter"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/command/shared/accessverifier"
+ "gitlab.com/gitlab-org/gitlab-shell/go/internal/command/shared/disallowedcommand"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/config"
)
-var (
- disallowedCommandError = errors.New("> GitLab: Disallowed command")
-)
-
type Command struct {
Config *config.Config
Args *commandargs.CommandArgs
@@ -22,7 +17,7 @@ type Command struct {
func (c *Command) Execute() error {
args := c.Args.SshArgs
if len(args) != 2 {
- return disallowedCommandError
+ return disallowedcommand.Error
}
repo := args[1]