Back to godoc.org
github.com/mutagen-io/mutagen/cmd

package cmd

v0.11.4
Latest Go to latest
Published: Apr 24, 2020 | License: MIT | Module: github.com/mutagen-io/mutagen

Overview

Package cmd contains various facilities for the command line portion of Mutagen.

Index

Constants

const (
	DelimiterLine = "--------------------------------------------------------------------------------"
)

Variables

var TerminationSignals = []os.Signal{
	syscall.SIGINT,
	syscall.SIGTERM,
}

TerminationSignals are those signals which Mutagen considers to be requesting termination.

func Error

func Error(err error)

Error prints an error message to standard error.

func Fatal

func Fatal(err error)

Fatal prints an error message to standard error and then terminates the process with an error exit code.

func HandleTerminalCompatibility

func HandleTerminalCompatibility()

HandleTerminalCompatibility automatically restarts the current process inside a terminal compatibility emulator if necessary. It currently only handles the case of mintty consoles on Windows requiring a relaunch of the current command inside winpty.

func Warning

func Warning(message string)

Warning prints a warning message to standard error.

type StatusLinePrinter

type StatusLinePrinter struct {
	// UseStandardError causes the printer to use standard error for its output
	// instead of standard output (the default).
	UseStandardError bool
	// contains filtered or unexported fields
}

StatusLinePrinter provides printing facilities for dynamically updating status lines in the console. It supports colorized printing.

func (*StatusLinePrinter) BreakIfNonEmpty

func (p *StatusLinePrinter) BreakIfNonEmpty()

BreakIfNonEmpty prints a newline character if the current line is non-empty.

func (*StatusLinePrinter) Clear

func (p *StatusLinePrinter) Clear()

Clear clears any content on the status line and moves the cursor back to the beginning of the line.

func (*StatusLinePrinter) Print

func (p *StatusLinePrinter) Print(message string)

Print prints a message to the status line, overwriting any existing content. Color escape sequences are supported. Messages will be truncated to a platform-dependent maximum length and padded appropriately.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier