nginxinc / nginx-go-crossplane

A library for working with NGINX configs in Go
Apache License 2.0
46 stars 12 forks source link

Provide `-filter` and `-override` with command line generator #106

Closed dengsh12 closed 1 month ago

dengsh12 commented 1 month ago

Proposed changes

In #101, we provided a command line generator for support files. The generator creates a directives map and matchFunc based on the directives definition in the source code.

However, some directives in source codes are outdated or unofficial (like post_action in OSS). You may only want to include some official directives in output and we provide a -filter option to achieve this.

Some directives have different definition in crossplane vs source code(like if in OSS, we added ngxConfExpr to it). You may want to override the output and we provide a -override option to achieve this.

Checklist

Before creating a PR, run through this checklist and mark each as complete.