whatisgithub

What is yaml?

go-yaml/yaml — explained in plain English

Analysis updated 2026-06-24

7,024GoAudience · developerComplexity · 2/5Setup · easy

In one sentence

A Go library for reading and writing YAML files, call Unmarshal to parse YAML text into a Go struct, or Marshal to turn a Go value back into YAML, with support for most of YAML 1.2.

Mindmap

mindmap
  root((go-yaml))
    What it does
      Parse YAML to Go
      Marshal Go to YAML
    API
      Unmarshal function
      Marshal function
    Compatibility
      YAML 1.2 support
      Legacy YAML 1.1
    Status
      Stable release
      Now unmaintained
    Audience
      Go developers
      Config file users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Parse a YAML configuration file into a typed Go struct for use in your application.

USE CASE 2

Serialize Go data to YAML for human-readable configuration or output files.

USE CASE 3

Read existing YAML 1.1 config files that use yes/no or on/off as booleans without breaking compatibility.

What is it built with?

Golibyaml

How does it compare?

go-yaml/yamlgtsteffaniak/filebrowserwoodpecker-ci/woodpecker
Stars7,0247,0257,021
LanguageGoGoGo
Setup difficultyeasyeasymoderate
Complexity2/52/54/5
Audiencedeveloperops devopsops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Project is now unmaintained, the existing v3 release is stable but no new development is expected.

So what is it?

This is a Go library for reading and writing YAML. YAML is a text format commonly used in configuration files and data exchange, where you write key-value pairs and nested structures using indentation instead of curly braces or XML tags. This library lets Go programs convert YAML text into Go data structures and back. The package was originally developed at Canonical, the company behind Ubuntu, as part of the juju infrastructure project. It is built on a Go port of libyaml, a widely used C library for parsing YAML. The v3 release supports most of YAML 1.2 while keeping some older YAML 1.1 behaviors for compatibility with existing files, such as recognizing yes/no and on/off as boolean values when the destination type is a bool. To use it, you import the package path gopkg.in/yaml.v3, then call Unmarshal to parse YAML text into a Go struct or map, or Marshal to produce YAML from your data. The code example in the README shows a short YAML snippet being decoded into a typed struct, then marshaled back into YAML text. Note: the README states this project is now unmaintained. The original author, Gustavo Niemeyer, stopped active maintenance due to limited time and was unable to transfer the project to a larger organization. The repository remains available and the existing release is stable, but new development is not expected.

Copy-paste prompts

Prompt 1
Show me how to use gopkg.in/yaml.v3 to parse a YAML config file into a Go struct with nested fields and default values.
Prompt 2
Help me write a Go program that reads a YAML file at startup and writes updated settings back to a YAML file on exit.
Prompt 3
I am getting a yaml.Unmarshal type error in my Go code, help me debug why the YAML field is not mapping to my struct field.
Prompt 4
Show me how to use gopkg.in/yaml.v3 Marshal to convert a Go map into a properly indented YAML string.

Frequently asked questions

What is yaml?

A Go library for reading and writing YAML files, call Unmarshal to parse YAML text into a Go struct, or Marshal to turn a Go value back into YAML, with support for most of YAML 1.2.

What language is yaml written in?

Mainly Go. The stack also includes Go, libyaml.

How hard is yaml to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is yaml for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.