modulepackage
1.2.0
Repository: https://github.com/bryanaustin/structquery.git
Documentation: pkg.go.dev
# README
structquery
Query data structures using string path in Go
Note: This project is incomplete, not stable, and most features don't work. I am not working on it at the moment. I am shelving it for work later.
Using an Xpath-like query language to get, add, remove, or replace values in a Go data structure. Great for dynamic data structures.
Example
package main
import (
"fmt"
"github.com/bryanaustin/structquery"
)
func main() {
x := map[string]int{"one":1, "two":2, "ten":10}
y, _ := structquery.Get(x, "two")
fmt.Println(y[0])
// Output: 2
}
# Functions
Add the provided value at the specified path.
Get retrieves the value from the object at the specified path.
Match will find elements of the provided obj and return refrences to their values.
Remove the provided value at the specified path.
Replace the target with the value provided and return the old value.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author