Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OutputTemplate = fmt.Sprintf("%s\n%s\n%s", outputBeginComment, outputContent, outputEndComment) OutputModes = strings.Join([]string{outputModeInject, outputModeReplace}, ", ") )
Output to file template and modes
View Source
var AllSections = strings.Join(allSections, ", ")
AllSections list.
View Source
var SortTypes = strings.Join(allSorts, ", ")
SortTypes list.
Functions ¶
func Annotations ¶
Annotations returns set of annotations for cobra.Commands, specifically the command 'name' and command 'kind'
func PreRunEFunc ¶
PreRunEFunc returns actual 'cobra.Command#PreRunE' function for 'formatter' commands. This functions reads and normalizes flags and arguments passed through CLI execution.
Types ¶
type Config ¶
type Config struct { File string `mapstructure:"-"` Formatter string `mapstructure:"formatter"` Version string `mapstructure:"version"` HeaderFrom string `mapstructure:"header-from"` Content string `mapstructure:"content"` Sections sections `mapstructure:"sections"` Output output `mapstructure:"output"` OutputValues outputvalues `mapstructure:"output-values"` Sort sort `mapstructure:"sort"` Settings settings `mapstructure:"settings"` // contains filtered or unexported fields }
Config represents all the available config options that can be accessed and passed through CLI
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns new instance of Config with default values set
Click to show internal directories.
Click to hide internal directories.