testr

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package testr provides a logr.LogSink implementation using *testing.T.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(t *testing.T, options ...Option) logr.Logger

NewLogger returns a logr.Logger that outputs through t with the given options.

Types

type Option

type Option func(*option)

An Option sets an option.

func WithErrors

func WithErrors(enabled bool) Option

WithErrors returns an Option that enables mapping error logs to testing errors.

func WithVerbosity

func WithVerbosity(verbosity int) Option

WithVerbosity returns an Option that sets the verbosity.

Jump to

Keyboard shortcuts

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