commands

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2015 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debugging    = false
	ErrorBuffer  = &bytes.Buffer{}
	ErrorWriter  = io.MultiWriter(os.Stderr, ErrorBuffer)
	OutputWriter = io.MultiWriter(os.Stdout, ErrorBuffer)
	RootCmd      = &cobra.Command{
		Use: "git-lfs",
		Run: func(cmd *cobra.Command, args []string) {
			versionCommand(cmd, args)
			cmd.Usage()
		},
	}
	ManPages = make(map[string]string, 20)
)

Functions

func Debug

func Debug(format string, args ...interface{})

Debug prints a formatted message if debugging is enabled. The formatted message also shows up in the panic log, if created.

func Error

func Error(format string, args ...interface{})

Error prints a formatted message to Stderr. It also gets printed to the panic log if one is created for this command.

func Exit

func Exit(format string, args ...interface{})

Exit prints a formatted message and exits.

func LoggedError

func LoggedError(err error, format string, args ...interface{})

LoggedError prints a formatted message to Stderr and writes a stack trace for the error to a log file without exiting.

func Panic

func Panic(err error, format string, args ...interface{})

Panic prints a formatted message, and writes a stack trace for the error to a log file before exiting.

func PipeCommand

func PipeCommand(name string, args ...string) error

func PipeMediaCommand

func PipeMediaCommand(name string, args ...string) error

func Print

func Print(format string, args ...interface{})

Print prints a formatted message to Stdout. It also gets printed to the panic log if one is created for this command.

func Run

func Run()

Types

type ErrorWithStack

type ErrorWithStack interface {
	Context() map[string]string
	InnerError() string
	Stack() []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL