test

package
Version: v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env map[string]string

Env is a test helper to facilitate setting up environment variables.

func (Env) Set

func (e Env) Set(t *testing.T)

Set places the environment variables in Env in the environment. The environment variables are automatically cleaned up after test completion.

type StringBuffer

type StringBuffer struct {
	// contains filtered or unexported fields
}

StringBuffer implements a simple buffer that can be used in tests. It implements the io.Writer interface. Each write will append a string to the Buffer.

func NewStringBuffer

func NewStringBuffer() *StringBuffer

NewStringBuffer returns a StringBuffer.

func (*StringBuffer) Index added in v0.9.0

func (l *StringBuffer) Index(i int) string

func (*StringBuffer) Len added in v0.9.0

func (l *StringBuffer) Len() int

func (*StringBuffer) Write

func (l *StringBuffer) Write(p []byte) (int, error)

Write implements the io.Writer interface.

Jump to

Keyboard shortcuts

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