Skip to content

refactor: favor ctx passing instead of keeping field in struct #1100

@bartoszmajsak

Description

@bartoszmajsak
What can be improved

type SessionContext struct {
context.Context
Name string
Namespace string
Route Route
Client client.Client
Log logr.Logger
}

https://go.dev/blog/context-and-structs

Why

It's considered confusing and discouraged by golang team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementKind: New feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions