Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type safe stashing of context values #546

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Commits on Sep 19, 2024

  1. Type safe stashing of values

    Introducing a Stasher which is a convenience helper for interacting with
    typed values for a single stash key. The stasher itself is generic and
    handles casting retrieved values to the desired type.
    
    There are three different ways to handle the value not existing or being
    of the wrong type:
    
    - RetrieveOrDie panics if a value of the desired type is not found
    - RetrieveOrError errors if a value of the desired type is not found
    - RetrieveOrEmpty falls back to the empty value for the type
    
    Signed-off-by: Scott Andrews <scott@andrews.me>
    scothis committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    c55d7cb View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Update reconcilers/stash.go

    Co-authored-by: Max Brauer <mamachanko@users.noreply.github.com>
    Signed-off-by: Scott Andrews <scott@andrews.me>
    scothis and mamachanko committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    5dcfc6a View commit details
    Browse the repository at this point in the history