cli

package
v0.0.0-...-2f7d48a Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main() int

Main is the main entrypoint for the gtfix binary.

func ParseAndRun

func ParseAndRun(stdout, stderr io.Writer, stdin io.Reader, args []string) int

ParseAndRun parses the command line, and then runs gtfix.

Types

type Command

type Command struct {
	Orig    string
	Replace string
	List    bool // if true, only list what files need formatting
	Files   []string
	Stdout  io.Writer
	Stdin   io.Reader
	Stderr  io.Writer
}

Command is a Command to run.

func Parse

func Parse(stdout io.Writer, args []string) (*Command, error)

Parse parses the given args.

func (*Command) Run

func (c *Command) Run() error

Run runs the command

Jump to

Keyboard shortcuts

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