cmd

package
v0.0.0-...-53c8938 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 15 Imported by: 0

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
	Cause error
}

ExitCode is just a way to transport the exit code to the main package

func (ExitCode) Error

func (e ExitCode) Error() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL