output

package
v5.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2016 License: Apache-2.0 Imports: 26 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdErrIsATerminal = terminal.IsTerminal(int(os.Stderr.Fd()))

Functions

func InitLogging

func InitLogging(verbosity int, logFile string, logFileLevel int)

InitLogging initialises logging backends. verbosity controls output to shell, logFile and logFileLevel what's (optionally) logged to a file as well.

func MonitorState

func MonitorState(state *core.BuildState, numThreads int, plainOutput, keepGoing, shouldBuild, shouldTest, shouldRun bool, traceFile string) bool

func ParseFlags

func ParseFlags(appname string, data interface{}, args []string) (*flags.Parser, []string, error)

ParseFlags parses the app's flags and returns the parser, any extra arguments, and any error encountered. It may exit if certain options are encountered (eg. --help).

func ParseFlagsFromArgsOrDie

func ParseFlagsFromArgsOrDie(appname string, data interface{}, args []string) *flags.Parser

ParseFlagsFromArgsOrDie is similar to ParseFlagsOrDie but allows control over the flags passed.

func ParseFlagsOrDie

func ParseFlagsOrDie(appname string, data interface{}) *flags.Parser

ParseFlagsOrDie, as the name suggests, parses the app's flags and dies if unsuccessful. Also dies if any unexpected arguments are passed.

func PrintCoverage

func PrintCoverage(state *core.BuildState, includeFiles []string)

PrintCoverage writes out coverage metrics after a test run in a file tree setup. Only files that were covered by tests and not excluded are shown.

func PrintLineCoverageReport

func PrintLineCoverageReport(state *core.BuildState, includeFiles []string)

PrintCoverageReport writes out line-by-line coverage metrics after a test run.

func SetColouredOutput

func SetColouredOutput(on bool)

SetColouredOutput forces on or off coloured output in logging and other console output.

func SetWindowTitle

func SetWindowTitle(title string)

SetWindowTitle sets the title of the current shell window.

Types

type ByteSize

type ByteSize uint64

A ByteSize is used for flags that represent some quantity of bytes that can be passed as human-readable quantities (eg. "10G").

func (*ByteSize) UnmarshalFlag

func (b *ByteSize) UnmarshalFlag(in string) error

UnmarshalFlag implements the flags.Unmarshaler interface.

type Duration

type Duration time.Duration

A Duration is used for flags that represent a time duration; it's just a wrapper around time.Duration that implements the flags.Unmarshaler interface.

func (*Duration) UnmarshalFlag

func (d *Duration) UnmarshalFlag(in string) error

UnmarshalFlag implements the flags.Unmarshaler interface.

Jump to

Keyboard shortcuts

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