differ

package
v0.5.6 Latest Latest
Warning

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

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

Documentation

Overview

Package differ turns a single attribute's before/after values into an ordered list of render variants (preferred → minimal). All value-type knowledge lives here; fit and render treat the result generically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(in Input) model.Field

Diff builds the ordered variant ladder for one attribute.

Types

type Input

type Input struct {
	ResourceType string
	Attr         string
	Before       any
	After        any
	Sensitive    bool
	// BeforeSensitive/AfterSensitive carry Terraform's per-path sensitivity tree
	// for this attribute (bool, or a nested map/list mirroring the value). A
	// structural diff consults them to redact only the sensitive sub-paths, so a
	// deep sensitive leaf no longer smears "(sensitive value)" across the block.
	BeforeSensitive any
	AfterSensitive  any
	Unknown         bool
	ForceDiffer     string // "" | auto | structural | json | yaml | line | summary | hide
	MaxLines        int    // 0 = no cap
	NoDetect        bool   // when true, skip type sniffing for string values (force line diff)
}

Input is everything Diff needs for one attribute.

Jump to

Keyboard shortcuts

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