Ejemplo
Query and extract typed YAML values using YAMLPath expressions with yaml.PathString and yaml.Path.Read
sha256:1bd51dda8c21d5774cdc203764c64e6af32451d55998c445bc460c8f67cb3068
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- go
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- go
- Lenguaje
- go
- Gestor de paquetes
- go
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- go 1.26
- Sistema operativo
- linux alpine · musl
- Arquitectura
- x64
- Runtime
- go 1.26
- Lenguaje
- go
- Gestor de paquetes
- go
- Ejecución
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
Caso
- Objetivo
- Query and extract typed YAML values using YAMLPath expressions with yaml.PathString and yaml.Path.Read HOW
- Paquetes
-
github.com/goccy/go-yaml 1.19.2
- Entorno
- go
- Creado
- 2026-08-17T13:16:52Z
Contrato
- 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.
Archivos
- NOTES.md
- csx.json
- go.mod
- go.sum
- yaml_test.go
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9