Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = map[string]Command{ "python": { Executable: "python", Switches: []string{"-m", "ast", "-a"}, Options: "", }, "ruby": { Executable: "ruby", Switches: []string{"--dump=parsetree"}, Options: "", }, "sql": { Executable: "sqlformat", Switches: []string{ "--reindent_aligned", "--identifiers=lower", "--strip-comments", "--keywords=upper", }, Options: "", }, "javascript": { Executable: "node", Switches: []string{"-e", JsSwitches}, Options: `{sourceType: "module", ecmaVersion: "latest"}`, }, "json": { Executable: "jsonformat", Switches: []string{}, Options: "", }, "go": { Executable: "gotree", Switches: []string{}, Options: "", }, }
View Source
var JsSwitches string = `` /* 218-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { Executable string `toml:"executable"` Switches []string `toml:"switches"` Options string `toml:"options"` }
Structs to hold options and configurations
type Config ¶
type Config struct { Description string `toml:"description"` Commands map[string]Command `toml:"commands"` Glob string `toml:"glob"` }
Structs to hold options and configurations
type Highlights ¶
type Highlights struct { Add string Del string Header string Info string Clear string Neutral string }
Structs to hold options and configurations
var Colors Highlights = Highlights{
Add: "\x1b[32m",
Del: "\x1b[31m",
Header: "\x1b[33m",
Info: "\x1b[36m",
Clear: "\x1b[0m",
Neutral: "",
}
In places, github.com/fatih/color is used, but raw ANSI is easier for writing custom reports based on sergi/go-diff/diffmatchpatch
var Dumbterm Highlights = Highlights{
Add: "{{+",
Del: "{{-",
Header: "",
Info: "",
Clear: "}}",
Neutral: "{{_",
}
var PlainASCII Highlights = Highlights{
Add: "",
Del: "",
Header: "",
Info: "",
Clear: "",
Neutral: "",
}
Click to show internal directories.
Click to hide internal directories.