summaryrefslogtreecommitdiff
path: root/go/internal/command/discover/discover.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/internal/command/discover/discover.go')
-rw-r--r--go/internal/command/discover/discover.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/go/internal/command/discover/discover.go b/go/internal/command/discover/discover.go
index 9bb442f..7d4ad2b 100644
--- a/go/internal/command/discover/discover.go
+++ b/go/internal/command/discover/discover.go
@@ -10,20 +10,21 @@ import (
)
type Command struct {
- Config *config.Config
- Args *commandargs.CommandArgs
+ Config *config.Config
+ Args *commandargs.CommandArgs
+ ReadWriter *readwriter.ReadWriter
}
-func (c *Command) Execute(readWriter *readwriter.ReadWriter) error {
+func (c *Command) Execute() error {
response, err := c.getUserInfo()
if err != nil {
return fmt.Errorf("Failed to get username: %v", err)
}
if response.IsAnonymous() {
- fmt.Fprintf(readWriter.Out, "Welcome to GitLab, Anonymous!\n")
+ fmt.Fprintf(c.ReadWriter.Out, "Welcome to GitLab, Anonymous!\n")
} else {
- fmt.Fprintf(readWriter.Out, "Welcome to GitLab, @%s!\n", response.Username)
+ fmt.Fprintf(c.ReadWriter.Out, "Welcome to GitLab, @%s!\n", response.Username)
}
return nil