Documentation
¶
Overview ¶
Package config provides shared configuration mechanisms for packages this module.
This package is an implementation detail, the configuration surface for users is provided via diff.Option.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = Config{ Context: 3, Mode: ModeDefault, IndentHeuristic: false, ForceAnchoringHeuristic: false, }
Default is the default configuration.
Functions ¶
This section is empty.
Types ¶
type ColorConfig ¶
type Config ¶
type Config struct {
// Context is the number of matches to include as a prefix and postfix for hunks returned.
Context int
// Diff algorithm mode.
Mode Mode
// If set, textdiff will apply ident heuristics.
IndentHeuristic bool
// If not nil, textdiff.Unify will use this to color the output.
Colors *ColorConfig
// If set, internal/myers will always use the anchoring heuristic. This configuration is not
// exposed via an option API, it's main use is for testing.
ForceAnchoringHeuristic bool
}
Config collects all configurable parameters for comparison functions in this module.
func FromOptions ¶
FromOptions creates a configuration from a set of options.
type Flag ¶
type Flag int
Flag describes a single config entry. This is used to detect if configurations are being set that are not
Click to show internal directories.
Click to hide internal directories.