Exemple
Query and extract typed YAML values using YAMLPath expressions with yaml.PathString and yaml.Path.Read
sha256:1bd51dda8c21d5774cdc203764c64e6af32451d55998c445bc460c8f67cb3068
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- go
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- go
- Langage
- go
- Gestionnaire de paquets
- go
Environnements des exécutions de vérification
- Contexte d'exécution
- go 1.26
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- go 1.26
- Langage
- go
- Gestionnaire de paquets
- go
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
Cas
- Objectif
- Query and extract typed YAML values using YAMLPath expressions with yaml.PathString and yaml.Path.Read HOW
- Paquets
-
github.com/goccy/go-yaml 1.19.2
- Environnement
- go
- Créé
- 2026-08-17T13:16:52Z
Contrat
- yaml.PathString parses JSONPath expressions for YAML supporting root ($), child traversal (.), array indexing ([n]), wildcards ([*]), recursive descent (..), and quoted keys (.'key').
- yaml.Path.Read streams and unmarshals target matched elements directly into Go primitives, structs, and slices from an io.Reader without intermediate document structures.
- yaml.Path.Read returns an error recognized by yaml.IsNotFoundNodeError when a queried path does not exist in the YAML document.
- yaml.PathString returns an error recognized by yaml.IsInvalidPathStringError when given malformed path syntax.
Fichiers
- NOTES.md
- csx.json
- go.mod
- go.sum
- yaml_test.go
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9