Skip to content

Proposal - Make analyze variables and functions public #115

Open
@rikatz

Description

@rikatz

Is your feature request related to a problem? Please describe

This is a feature request to make analyzer.go constants public and change the generator to allow consuming these constants

Describe the solution you'd like

Using generators to create analyzers is great! This means I can have my own third party, generated consistently from official code (see https://github.com/kubernetes/ingress-nginx/tree/feature-go-crossplane/internal/ingress/controller/template/crossplane/extramodules)

The problem is that the const directives (https://github.com/kubernetes/ingress-nginx/blob/feature-go-crossplane/internal/ingress/controller/template/crossplane/extramodules/analyze.go#L30) are private, meaning I had to partially copy the file to the same place of the generated files.

As a proposal:

  • Make these consts public
  • Change the generator, so you can tell if it should get these const from the same dir (meaning NGINX Inc is probably running it to port to nginx-go-crossplane) or I am a third party generating an analyzer for my module, and not needing to copy partially these directives

Describe alternatives you've considered

See the file above on the alternative approach used

Additional context

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions