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.
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 { BaseDir string `yaml:"-"` File string `yaml:"-"` Formatter string `yaml:"formatter"` HeaderFrom string `yaml:"header-from"` Sections sections `yaml:"sections"` Output output `yaml:"output"` OutputValues outputvalues `yaml:"output-values"` Sort sort `yaml:"sort"` Settings settings `yaml:"settings"` }
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.