Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 12 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,markdown"`
	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:"allow-duplicate-key" default:"true" usage:"allow the use of keys with the same name in the same map"`
	DiffCommand          string    `name:"diff-cmd" short:"x" usage:"invoke this to get diff instead of builtin differ"`
	Verbose              bool      `name:"verbose" short:"v" usage:"enable verbose output; annotate diff type and display summary"`
	Labels               []string  `` /* 136-byte string literal not displayed */
	MarkdownHeadingLevel uint      `name:"markdown-heading" default:"1" usage:"highest heading level in markdown"`
	Stdin                io.Reader `name:"-"`
	IgnoreMatchingLines  []string  `` /* 150-byte string literal not displayed */
	IgnoreFields         []string  `` /* 150-byte string literal not displayed */
	IgnoreLabels         []string  `name:"ignore-label" split:"true" sep:";" usage:"ignore label by key (may be separated by ';' or specified multiple times)"`
	IgnoreAnnotations    []string  `` /* 132-byte string literal not displayed */
	IgnoreManagedFields  bool      `name:"ignore-managed-fields" usage:"ignore metadata.managedFields"`
	IgnoreStatus         bool      `name:"ignore-status" usage:"ignore status field"`
}

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"
	OutModeMarkdown OutMode = "markdown"
)

Jump to

Keyboard shortcuts

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