Skip to content

Commit

Permalink
Remove field username in UsernameFromContext (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
TuanKiri authored May 17, 2024
1 parent c47c77e commit e64444b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func contextWithUsername(ctx context.Context, username string) context.Context {
return context.WithValue(ctx, usernameKey, username)
}

func UsernameFromContext(ctx context.Context, username string) (string, bool) {
func UsernameFromContext(ctx context.Context) (string, bool) {
value, ok := ctx.Value(usernameKey).(string)
return value, ok
}

0 comments on commit e64444b

Please sign in to comment.