Help us shape the future of Go! Take the 2026 Go Developer Survey

resolver

package
v0.1.58 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assign

func Assign(target map[string]interface{}, selector string, value interface{}) error

Assign writes a value into the provided JSON-like map using the same selector syntax supported by Select, but without the input/output prefix. Missing object segments are created automatically. Array writes are only supported when the indexed segment already exists.

func Select

func Select(selector string, input, output interface{}) interface{}

Select resolves a value from either the input or output JSON-like roots (maps/slices produced by json.Unmarshal) based on a dot/bracket selector.

Supported prefixes:

  • "output" (default when no prefix is provided)
  • "input"

Supported path syntax:

  • dot-separated keys: a.b.c
  • array indices: a.0.b or a[0].b

When a path segment cannot be resolved the function returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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