internal

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	SpecFile string `validate:"required,filepath" short:"s" long:"spec" description:"Path to the openapi file"`
	Debug    bool   `short:"d" long:"debug" description:"Should the program emit debug logs on stderr"`
	Filter   string `` /* 127-byte string literal not displayed */
	Find     string `long:"find" description:"Find sub-strings by regular expression to select for replacement"`
	Replace  string `long:"replace" description:"Replace found sub-strings with the given string. Supports capture groups from the regex"`
	Template string `validate:"omitempty,filepath" short:"t" long:"template" description:"Path to a go template file to format the output"`

	StdOut io.Writer
	StdErr io.Writer
}

App holds the configuration and io writers for the application.

func New

func New() (*App, error)

New creates a new App instance with default values, over-riden by any runtime flags.

New returns an error if we fail to process runtime flags, or if validation of the config fails.

func (App) Run

func (a App) Run()

Run executes the main logic of the App.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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