Skip to content

Commit defe4d4

Browse files
Apply 2 suggestion(s) to 1 file(s)
Co-authored-by: Ash McKenzie <[email protected]>
1 parent e244aa2 commit defe4d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/command/discover/discover.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212
"gitlab.com/gitlab-org/gitlab-shell/v14/internal/gitlabnet/discover"
1313
)
1414

15+
type logDataKey struct{}
16+
1517
// Command struct encapsulates the necessary components for executing the Discover command.
1618
type Command struct {
1719
Config *config.Config
@@ -35,7 +37,7 @@ func (c *Command) Execute(ctx context.Context) (context.Context, error) {
3537
_, _ = fmt.Fprintf(c.ReadWriter.Out, "Welcome to GitLab, @%s!\n", response.Username)
3638
}
3739

38-
ctxWithLogData := context.WithValue(ctx, "logData", logData)
40+
ctxWithLogData := context.WithValue(ctx, logDataKey{}, logData)
3941

4042
return ctxWithLogData, nil
4143
}

0 commit comments

Comments
 (0)