Back to

Package testing

Latest Go to latest

The latest major version is .

Published: Aug 27, 2019 | License: Apache-2.0 | Module:


func ClearAll

func ClearAll()

ClearAll removes all the testing loggers. `go test -count=X` executes runs in the same process, thus the map persists between the runs, but the `t` will no longer be valid and will cause a panic deep inside testing code.

func TestContextWithLogger

func TestContextWithLogger(t *testing.T) context.Context

TestContextWithLogger returns a context with a logger to be used in tests

func TestLogger

func TestLogger(t *testing.T) *zap.SugaredLogger

TestLogger gets a logger to use in unit and end to end tests

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

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier