Documentation ¶
Index ¶
- Variables
- func InitLogging(verbosity int, logFile string, logFileLevel int)
- func MonitorState(state *core.BuildState, numThreads int, ...) bool
- func ParseFlags(appname string, data interface{}, args []string) (*flags.Parser, []string, error)
- func ParseFlagsFromArgsOrDie(appname string, data interface{}, args []string) *flags.Parser
- func ParseFlagsOrDie(appname string, data interface{}) *flags.Parser
- func PrintCoverage(state *core.BuildState, includeFiles []string)
- func PrintLineCoverageReport(state *core.BuildState, includeFiles []string)
- func SetColouredOutput(on bool)
- func SetWindowTitle(title string)
- type ByteSize
- type Duration
Constants ¶
This section is empty.
Variables ¶
var StdErrIsATerminal = terminal.IsTerminal(int(os.Stderr.Fd()))
Functions ¶
func InitLogging ¶
InitLogging initialises logging backends. verbosity controls output to shell, logFile and logFileLevel what's (optionally) logged to a file as well.
func MonitorState ¶
func ParseFlags ¶
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 ¶
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 ¶
UnmarshalFlag implements the flags.Unmarshaler interface.
type 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 ¶
UnmarshalFlag implements the flags.Unmarshaler interface.