Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func NewRootCmd ¶ added in v1.10.1
NewRootCmd returns the root command (for generating documentation)
func ResetSettings ¶ added in v1.0.0
func ResetSettings()
ResetSettings resets command settings to default. This is only required by the test suite to make sure that the flag parsing works correctly.
Types ¶
type OutputWriter ¶
type OutputWriter struct {
PlainMode bool
Restructure bool
OmitIndentHelper bool
OutputStyle string
}
OutputWriter encapsulates the required fields to define the look and feel of the output
func (*OutputWriter) WriteInplace ¶
func (w *OutputWriter) WriteInplace(filename string) error
WriteInplace writes the content of the documents stored in the provided input file to the file itself overwriting the content in place.
func (*OutputWriter) WriteToStdout ¶
func (w *OutputWriter) WriteToStdout(filename string) error
WriteToStdout is a convenience function to write the content of the documents stored in the provided input file to the standard output