---
title: go-yaml Call Hierarchy
---
flowchart TB
    subgraph LOAD ["LOAD: Pull-Based"]
        direction TB
        L_entry["Entry Point<br/>Decoder.Decode / Node.Decode"]
        L_constructor["Constructor<br/>constructor.go"]
        L_composer["Composer.Parse<br/>composer.go"]
        L_parser["Parser.Parse<br/>parser.go"]
        L_scanner["Scanner.Scan<br/>scanner.go"]
        L_reader["Reader.updateBuffer<br/>reader.go"]

        L_entry -->|calls| L_constructor
        L_constructor -->|calls| L_composer
        L_composer -->|calls| L_parser
        L_parser -->|calls via peekToken| L_scanner
        L_scanner -->|calls| L_reader
    end

    subgraph DUMP ["DUMP: Push-Based"]
        direction TB
        D_entry["Entry Point<br/>Encoder.Encode / Node.Encode"]
        D_representer["Representer.MarshalDoc<br/>representer.go"]
        D_serializer["Serializer.node<br/>serializer.go"]
        D_emitter["Emitter.Emit<br/>emitter.go"]
        D_writer["Writer.flush<br/>writer.go"]

        D_entry -->|calls| D_representer
        D_representer -->|for Go values| D_emitter
        D_representer -->|for Node| D_serializer
        D_serializer -->|calls emit| D_emitter
        D_emitter -->|calls| D_writer
    end
