config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDiffFound = errors.New("DiffFound")
View Source
var ErrNoDiffCommand = errors.New("NoDiffCommand")

Functions

This section is empty.

Types

type Config

type Config struct {
	Context           int    `name:"context" short:"C" default:"3" usage:"diff context"`
	Separator         string `name:"separator" short:"d" default:">" usage:"object id separator"`
	Indent            int    `name:"indent" short:"n" default:"2" usage:"yaml indent"`
	Out               string `name:"out" short:"o" default:"text" usage:"output format: text,yaml,id,idlist"`
	Debug             bool   `name:"debug" usage:"enable debug log"`
	Quiet             bool   `name:"quiet" short:"q" usage:"quiet log"`
	Color             bool   `name:"color" short:"c" usage:"colored diff"`
	DiffSuccess       bool   `name:"success" usage:"exit with 0 even if inputs differ"`
	AllowDuplicateKey bool   `name:"allowDuplicateKey" default:"true" usage:"allow the use of keys with the same name in the same map"`
	DiffCommand       string `name:"diffCmd" short:"x" usage:"invoke this to get diff instead of builtin differ"`
}

func (*Config) OutMode

func (c *Config) OutMode() OutMode

func (*Config) Run

func (c *Config) Run(w io.Writer, left, right string) error

type OutMode

type OutMode string
const (
	OutModeUnknown OutMode = "unknown"
	OutModeText    OutMode = "text"
	OutModeYaml    OutMode = "yaml"
	OutModeID      OutMode = "id"
	OutModeIDList  OutMode = "idlist"
)

Jump to

Keyboard shortcuts

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