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 ResetSettings ¶
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 ExitCode ¶
type ExitCode struct {
Value int
}
ExitCode is just a way to transport the exit code to the main package
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 conent 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