Exemplo
Query and extract typed YAML values using YAMLPath expressions with yaml.PathString and yaml.Path.Read
sha256:1bd51dda8c21d5774cdc203764c64e6af32451d55998c445bc460c8f67cb3068
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- go
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- go
- Linguagem
- go
- Gerenciador de pacotes
- go
Ambientes das execuções de verificação
- Contexto de execução
- go 1.26
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- go 1.26
- Linguagem
- go
- Gerenciador de pacotes
- go
- Execução
- 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
- Pacotes
-
github.com/goccy/go-yaml 1.19.2
- Ambiente
- go
- Criado
- 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.
Arquivos
- NOTES.md
- csx.json
- go.mod
- go.sum
- yaml_test.go
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9