サンプル
gopkg.in/yaml.v3 v3.0.1: Unmarshal YAML documents into yaml.Node AST where top-level mappings are wrapped in a DocumentNode and mapping entries are stored as a flat slice of alternating key and value nodes.
検証済みサンプル — golang gopkg.in/yaml.v3 v3.0.1: Unmarshal YAML documents into yaml.Node AST where top-level mappings are wrapped in a DocumentNode and mapping…
sha256:5a3c517c14c2b02913bd1dddf4ceb354fa20a12daf9bd8874291fdb094b5e78b
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 2
宣言された環境
go linux x64 go go go
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-17 |
| go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-18 |
ケース
HOW- ゴール
- Unmarshal YAML documents into yaml.Node AST where top-level mappings are wrapped in a DocumentNode and mapping entries are stored as a flat slice of alternating key and value nodes.
- パッケージ
- シンボル
-
- yaml.Node
- yaml.Unmarshal
- yaml.Node.Decode
- 環境
- go
- 作成日
- 2026-08-17T20:57:24Z
コントラクト
- yaml.Unmarshal into *yaml.Node produces a root DocumentNode with Kind 1 whose Content slice wraps the top-level MappingNode (Kind 4) at index 0 rather than returning a MappingNode directly.
- MappingNode.Content is a flat slice of 2*N nodes where even indices hold key scalar nodes and odd indices hold value nodes.
- HeadComment annotations attach to key nodes while inline LineComment annotations attach to value nodes.
- yaml.Node.Decode decodes AST subtrees directly into Go struct types.
- In-place AST scalar modifications preserve HeadComment and LineComment annotations across yaml.Encoder serialization.
- Types implementing UnmarshalYAML(value *yaml.Node) receive AST position metadata (Line and Column) and can decode underlying values via value.Decode.
ファイル
- NOTES.md
- csx.json
- go.mod
- go.sum
- yaml_test.go