diff

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 6 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diff

type Diff map[Type][]string

Diff format of a diff

func CompareConfigs

func CompareConfigs(old, new *ucfg.Config, opts ...ucfg.Option) Diff

CompareConfigs takes two configuration and return the difference between the defined keys

func (Diff) GoStringer

func (d Diff) GoStringer() string

GoStringer implement the GoStringer interface

func (*Diff) HasChanged

func (d *Diff) HasChanged() bool

HasChanged returns true if we have remove of added new elements in the graph

func (*Diff) HasKeyAdded

func (d *Diff) HasKeyAdded() bool

HasKeyAdded returns true if key were added in the new configuration

func (*Diff) HasKeyRemoved

func (d *Diff) HasKeyRemoved() bool

HasKeyRemoved returns true if not all keys are present in both configuration

func (Diff) String

func (d Diff) String() string

String return a human friendly format of the diff

type Type

type Type int

Type custom type to identify what was added, remove or keep in the configuration

const (
	// Remove keys no longer present in the config
	Remove Type = iota

	// Add keys added from the first config
	Add

	// Keep keys present in both config
	Keep
)

func (Type) String

func (dt Type) String() string

Jump to

Keyboard shortcuts

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