Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigFilePath ¶
GetConfigFilePath gets the full path to the given config file name.
func SaveConfig ¶ added in v1.0.0
SaveConfig will marshal and save the config struct to disk.
func SplitQuotedFields ¶ added in v1.0.0
SplitQuotedFields is like strings.Fields but ignores spaces inside areas surrounded by the specified quote character. To specify a single quote use backslash to escape it: '\”
Types ¶
type Config ¶
type Config struct {
// Commands aliases.
Aliases map[string][]string `yaml:"aliases"`
// Source code path substitution rules.
SubstitutePath SubstitutePathRules `yaml:"substitute-path"`
// MaxStringLen is the maximum string length that the commands print,
// locals, args and vars should read (in verbose mode).
MaxStringLen *int `yaml:"max-string-len,omitempty"`
// MaxArrayValues is the maximum number of array items that the commands
// print, locals, args and vars should read (in verbose mode).
MaxArrayValues *int `yaml:"max-array-values,omitempty"`
// MaxVariableRecurse is output evaluation depth of nested struct members, array and
// slice items and dereference pointers
MaxVariableRecurse *int `yaml:"max-variable-recurse,omitempty"`
// DisassembleFlavor allow user to specify output syntax flavor of assembly, one of
// this list "intel"(default), "gnu", "go"
DisassembleFlavor *string `yaml:"disassemble-flavor,omitempty"`
// If ShowLocationExpr is true whatis will print the DWARF location
// expression for its argument.
ShowLocationExpr bool `yaml:"show-location-expr"`
// Source list line-number color (3/4 bit color codes as defined
// here: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors)
SourceListLineColor int `yaml:"source-list-line-color"`
// number of lines to list above and below cursor when printfile() is
// called (i.e. when execution stops, listCommand is used, etc)
SourceListLineCount *int `yaml:"source-list-line-count,omitempty"`
// DebugFileDirectories is the list of directories Delve will use
// in order to resolve external debug info files.
DebugInfoDirectories []string `yaml:"debug-info-directories"`
}
Config defines all configuration options available to be set through the config file.
func LoadConfig ¶
func LoadConfig() *Config
LoadConfig attempts to populate a Config object from the config.yml file.
func (*Config) GetSourceListLineCount ¶ added in v1.4.1
type SubstitutePathRule ¶
type SubstitutePathRule struct {
// Directory path will be substituted if it matches `From`.
From string
// Path to which substitution is performed.
To string
}
SubstitutePathRule describes a rule for substitution of path to source code file.
type SubstitutePathRules ¶
type SubstitutePathRules []SubstitutePathRule
SubstitutePathRules is a slice of source code path substitution rules.
Click to show internal directories.
Click to hide internal directories.