dotnotation

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

README

dotnotation

Extract and manipulate values from interface maps and slices using dot notation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

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

Applier holds the compiled instructions to apply an operation to the compiled dotnotation path

func CompileApplier

func CompileApplier(expr string, op func(interface{}) interface{}) (*Applier, error)

CompileApplier compiles the dotnotation expression and returns an Applier

func (*Applier) Apply

func (a *Applier) Apply(v interface{})

Apply applies an operation to the compiled dotnotation path of the given data

type Extractor

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

Extractor holds the compiled instructions to extract the compiled dotnotation path values

func CompileExtractor

func CompileExtractor(expr string) (*Extractor, error)

CompileExtractor compiles the dotnotation expression and returns an Extractor

func (*Extractor) Extract

func (e *Extractor) Extract(v interface{}) []interface{}

Extract extracts the values in the compiled dotnotation path of the given data

Jump to

Keyboard shortcuts

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