Go API Documentation

github.com/go-task/task/v3/internal/output

No package summary is available.

Package

Files: 4. Third party imports: 0. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Vars

Types

CloseFunc

This type doesn't have documentation.

Field name Field type Comment
type

func(err error) error

No comment on field.

Group

This type doesn't have documentation.

Field name Field type Comment
Begin

string

No comment on field.
ErrorOnly

bool

No comment on field.

Interleaved

This type doesn't have documentation.

Output

This type doesn't have documentation.

Field name Field type Comment
type

any

No comment on field.

Prefixed

This type doesn't have documentation.

Field name Field type Comment
logger

*logger.Logger

No comment on field.
seen

map[string]uint

No comment on field.
counter

*uint

No comment on field.
mutex

sync.Mutex

No comment on field.

groupWriter

This type doesn't have documentation.

Field name Field type Comment
writer

io.Writer

No comment on field.
buff

bytes.Buffer

No comment on field.
begin

string

No comment on field.

prefixWriter

This type doesn't have documentation.

Field name Field type Comment
writer

io.Writer

No comment on field.
prefixed

*Prefixed

No comment on field.
prefix

string

No comment on field.
buff

bytes.Buffer

No comment on field.

Functions

func BuildFor

Build the Output for the requested ast.Output.

Uses: fmt.Errorf.

func NewPrefixed

func (*Prefixed) WrapWriter

func (*groupWriter) Write

func (*prefixWriter) Write

func (Group) WrapWriter

Uses: templater.Replace.

func (Interleaved) WrapWriter

Private functions

func checkOutputGroupUnset

References: fmt.Errorf.

func close

References: io.Copy, io.WriteString.

func close

func writeLine

References: fmt.Fprint, strings.HasSuffix.

func writeOutputLines

References: io.EOF, strings.HasSuffix.


Tests

Files: 1. Third party imports: 3. Imports from organisation: 0. Tests: 7. Benchmarks: 0.

Test functions

TestGroup

References: assert.Equal, bytes.Buffer, fmt.Fprintln, io.Discard, output.Group, output.Output, require.NoError.

TestGroupErrorOnlyShowsOutputOnError

References: assert.Equal, bytes.Buffer, errors.New, fmt.Fprintln, io.Discard, output.Group, output.Output, require.NoError.

TestGroupErrorOnlySwallowsOutputOnNoError

References: assert.Empty, bytes.Buffer, fmt.Fprintln, io.Discard, output.Group, output.Output, require.NoError.

TestGroupWithBeginEnd

References: assert.Equal, ast.NewVars, ast.Var, ast.VarElement, bytes.Buffer, fmt.Fprintln, io.Discard, output.Group, output.Output, require.NoError, templater.Cache, testing.T.

TestInterleaved

References: assert.Equal, bytes.Buffer, fmt.Fprintln, io.Discard, output.Interleaved, output.Output.

TestPrefixed

References: assert.Equal, bytes.Buffer, fmt.Fprint, fmt.Fprintln, io.Discard, logger.Logger, output.NewPrefixed, output.Output, require.NoError, testing.T.

TestPrefixedWithColor

References: assert.Equal, bytes.Buffer, color.NoColor, fmt.Fprintln, fmt.Sprintf, io.Discard, io.Writer, logger.Logger, output.NewPrefixed, output.Output, output.PrefixColorSequence, testing.T.