Version: v0.8.3 Latest Latest

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0 Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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

	// Keep keys present in both config

func (Type) String

func (dt Type) String() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL