diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-03-20 23:35:11 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-03-20 23:35:11 +0300 |
commit | 17b3c808ca5c2ffc7522905c23b1bba2a092321c (patch) | |
tree | 6c14e8d135db10ee17d3ca5c2c192efd3fe17fa8 /go/internal/command/discover/discover.go | |
parent | 18b7a5ccc078ddb2d61c8bcb86c1e2ea39c94630 (diff) | |
download | gitlab-shell-id-go-recovery-codes.tar.gz |
Implement getting recovery codes by usernameid-go-recovery-codes
Diffstat (limited to 'go/internal/command/discover/discover.go')
-rw-r--r-- | go/internal/command/discover/discover.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/go/internal/command/discover/discover.go b/go/internal/command/discover/discover.go index 9b53a51..9bb442f 100644 --- a/go/internal/command/discover/discover.go +++ b/go/internal/command/discover/discover.go @@ -35,13 +35,5 @@ func (c *Command) getUserInfo() (*discover.Response, error) { return nil, err } - if c.Args.GitlabKeyId != "" { - return client.GetByKeyId(c.Args.GitlabKeyId) - } else if c.Args.GitlabUsername != "" { - return client.GetByUsername(c.Args.GitlabUsername) - } else { - // There was no 'who' information, this matches the ruby error - // message. - return nil, fmt.Errorf("who='' is invalid") - } + return client.GetByCommandArgs(c.Args) } |