jq

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package jq provides logic which makes it easier to interact with gojq library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Expression string
}

type ExpressionRunner

type ExpressionRunner struct {
	// contains filtered or unexported fields
}

func NewExpressionRunner

func NewExpressionRunner(config Config) *ExpressionRunner

func (*ExpressionRunner) Evaluate

func (e *ExpressionRunner) Evaluate(v any) (iter.Seq2[any, error], error)

Evaluate parses, compiles and runs jq expressions. It returns an iterator which yields jq expression result and error (if any).

func (*ExpressionRunner) MustRegisterFlags

func (e *ExpressionRunner) MustRegisterFlags(cmd *cobra.Command)

func (*ExpressionRunner) ShouldRun

func (e *ExpressionRunner) ShouldRun() bool

Jump to

Keyboard shortcuts

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