testutils

package
v0.0.0-...-437ec41 Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	zaptest.Buffer
}

Buffer wraps zaptest.Buffer and provides convenience method JSONLine(n)

func NewLogger

func NewLogger() (*zap.Logger, *Buffer)

NewLogger creates a new zap.Logger backed by a zaptest.Buffer, which is also returned.

func (*Buffer) JSONLine

func (b *Buffer) JSONLine(n int) map[string]string

JSONLine reads n-th line from the buffer and converts it to JSON.

Jump to

Keyboard shortcuts

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