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

feat: provide an example of typed resource type #368

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 13, 2023

  1. feat: provide an example of typed resource type

    This is something that I wanted to try for a while - attach the resource type directly to the resource.Type constant.
    The (partial) result is this PR. While it may look interesting, I don't think that we should merge it ATM.
    
    Because:
    1. There are a LOT of `Naked()` calls around the code.
    2. This will require a lot of refactoring. Even here it required a lot of places to be changed.
    3. I'm not sure that this level of generic abuse is worth it (will it increase the resulting binary size because of the bloat?).
    
    Still, this is the good starting point if anyone is interested in how it could be done.
    
    Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
    DmitriyMV committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    d6848b3 View commit details
    Browse the repository at this point in the history