package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Nov 12, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Build constructs a field path string from a slice of segments.
Examples:
- [{Field: "spec"}, {Field: "containers", ArrayIdx: 0}] -> spec.containers[0]
- [{Field: "spec"}, {Field: "my.field"}] -> spec["my.field"]
type Segment struct {
Name string
Index int
}
Segment represents a single part of a path
NewIndexedSegment creates a new indexed segment.
NewNamedSegment creates a new named segment.
Parse parses a path string into segments. Assumes dictionary
access is always quoted.
example paths:
- spec["my.field.name"].items[0]["other.field"]
- simple.path["quoted.field"][0]
Source Files
¶
Click to show internal directories.
Click to hide internal directories.