kaniko/vendor/github.com/otiai10/mint/mquery
Michael Plump 3e56c7fd0f
chore: upgrade all the dependencies to their latest versions (#3454)
* chore: go get -u ./...

* chore: go mod tidy

* chore: go mod vendor

* chore: fix compilation for buildkit >= 0.15.0

* chore: upgrade to Go 1.24

* chore: upgrade the Debian container used in an integration test
2025-05-21 09:31:10 -04:00
..
README.md chore: upgrade all the dependencies to their latest versions (#3454) 2025-05-21 09:31:10 -04:00
mquery.go chore: upgrade all the dependencies to their latest versions (#3454) 2025-05-21 09:31:10 -04:00

README.md

mquery

import mquery

var m = map[string]interface{}{
	"foo": "bar",
	"hoge": map[string]interface{}{
		"name": "otiai10",
	},
	"fuga": map[int]map[string]interface{}{
		0: {"greet": "Hello"},
		1: {"greet": "こんにちは"},
	},
	"langs":    []string{"Go", "JavaScript", "English"},
	"baz":      nil,
	"required": false,
}

func main() {
    fmt.Println(
        Query(m, "foo"), // "bar"
        Query(m, "hoge.name"), // "otiai10"
        Query(m, "fuga.0.greet"), // "Hello"
        Query(m, "langs.2"), // "English"
        Query(m, "required"), // false
        Query(m, "baz.biz"), // nil
    )
}