You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are, impressively, around 250 functions for templating included in this package. We would be interested in a way to cherry-pick which functions we include when using this in our own project to reduce the surface area we wish to support. There is already a helper that trims out the non-hermetic functions, HermeticTxtFuncMap, but I'd be interested in one that returns functions or families of functions provided by the consumer.
Potential API
Here's one way this might be achieved, leveraging a design similar to the HermeticTxtFuncMap:
It may also be useful to surface an exported enum of supported functions to support this.
Alternatively, the genericMap could be exported, allowing consumers to manipulate the map and build their own template.FuncMap{} from that starting point.
The text was updated successfully, but these errors were encountered:
Problem Statement
There are, impressively, around 250 functions for templating included in this package. We would be interested in a way to cherry-pick which functions we include when using this in our own project to reduce the surface area we wish to support. There is already a helper that trims out the non-hermetic functions, HermeticTxtFuncMap, but I'd be interested in one that returns functions or families of functions provided by the consumer.
Potential API
Here's one way this might be achieved, leveraging a design similar to the HermeticTxtFuncMap:
It may also be useful to surface an exported enum of supported functions to support this.
Alternatively, the genericMap could be exported, allowing consumers to manipulate the map and build their own template.FuncMap{} from that starting point.
The text was updated successfully, but these errors were encountered: