pack

package
v1.0.46646-pre Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package pack merges a directory tree of YAML files into a single YAML document.

The merge rules are consistent across all CircleCI YAML packing (config and orbs):

  • Files at the pack root are merged at the top level of the output.
  • Subdirectory names become top-level YAML keys; files inside become entries under that key, keyed by filename without extension.
  • Deeper subdirectories are organisational only: their files join the top-level section their ancestor opened, so commands/aws/login.yml becomes commands.login. Two files that would claim the same key are an error.
  • Files whose names begin with "@" are merged at the current directory level rather than nested under a key (used for base files like @orb.yml).
  • Dotfiles and non-YAML files are skipped.
  • Packing a single file round-trips it through the YAML parser (normalising formatting) and returns the result.
  • Unquoted yes/no/on/off are booleans, as the CircleCI config compiler reads them, not strings as YAML 1.2 would.
  • A YAML anchor defined in one file may be aliased from any other file in the tree; the alias is replaced by the anchored value in the output.
  • Output is indented with four spaces, matching the 0.1.x CLI byte for byte.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pack

func Pack(rootPath string) (string, error)

Pack reads all YAML files under rootPath and merges them into a single YAML document. If rootPath is a single file it is parsed and re-serialised.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL