Documentation
¶
Overview ¶
Package jqutil provides shared gojq utilities used by multiple packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SecureCompileOpts = []gojq.CompilerOption{ gojq.WithEnvironLoader(func() []string { return nil }), }
SecureCompileOpts are the gojq compiler options applied to every Compile call in this project. Centralising them here ensures the security intent ($ENV disabled) is never accidentally omitted from a future compile site.
Both internal/config and internal/middleware need identical options. Defining them once in this leaf package removes the duplication and guards against the two copies drifting apart.
Functions ¶
func CompileOptsWithVariables ¶ added in v0.4.2
func CompileOptsWithVariables(varNames []string) []gojq.CompilerOption
CompileOptsWithVariables returns a new slice combining SecureCompileOpts with gojq.WithVariables for the given variable names. The returned slice is always a fresh allocation, so callers never mutate the shared SecureCompileOpts backing array.
Types ¶
This section is empty.