Skip to content

codify: replace valast.Addr(v).(*T) with k8s.io/utils/pointer equivalents?Β #83

@dnwe

Description

@dnwe

πŸ‘‹πŸ» Firstly, thank you so much for naml β€” it is wonderful!


It would be great if the codify-generated code could avoid the runtime dependency on valast by using the k8s.io/utils/pointer package for getting pointers to a primitive:

e.g.,

-valast.Addr(false).(*bool)
+pointer.Bool(false)
-valast.Addr(int64(65534)).(*int64)
+pointer.Int64(65534)

etc.

This also produces more readable code.

Obviously there's no built-in support in valast for customising the generated ast so it would have to be a post-processing task done in codify itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions