prune

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package prune removes keys from a values file while keeping everything else byte-for-byte: comments, ordering, quoting and indentation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(data []byte, edits []Edit) ([]byte, int, error)

Apply removes every edit from data. A map left empty by a removal is removed as well. It returns the new content and how many keys were found.

Types

type Edit

type Edit struct {
	Doc  int
	Path []string
}

Edit is one key to remove: Path inside YAML document Doc of the file.

Jump to

Keyboard shortcuts

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