jqutil

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package jqutil provides shared gojq utilities used by multiple packages.

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL