diff options
Diffstat (limited to 'go/internal/command/commandargs/command_args.go')
-rw-r--r-- | go/internal/command/commandargs/command_args.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/go/internal/command/commandargs/command_args.go b/go/internal/command/commandargs/command_args.go deleted file mode 100644 index 4831134..0000000 --- a/go/internal/command/commandargs/command_args.go +++ /dev/null @@ -1,31 +0,0 @@ -package commandargs - -import ( - "gitlab.com/gitlab-org/gitlab-shell/go/internal/executable" -) - -type CommandType string - -type CommandArgs interface { - Parse() error - GetArguments() []string -} - -func Parse(e *executable.Executable, arguments []string) (CommandArgs, error) { - var args CommandArgs = &GenericArgs{Arguments: arguments} - - switch e.Name { - case executable.GitlabShell: - args = &Shell{Arguments: arguments} - case executable.AuthorizedKeysCheck: - args = &AuthorizedKeys{Arguments: arguments} - case executable.AuthorizedPrincipalsCheck: - args = &AuthorizedPrincipals{Arguments: arguments} - } - - if err := args.Parse(); err != nil { - return nil, err - } - - return args, nil -} |