mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package mocks contains mocks

Index

Constants

This section is empty.

Variables

View Source
var ErrMocked = errors.New("mocked error")

ErrMocked is a mocked error

Functions

This section is empty.

Types

type FailingWriter

type FailingWriter struct{}

FailingWriter is a writer that always fails

func (FailingWriter) Write

func (FailingWriter) Write([]byte) (int, error)

Write always returns a mocked error

type SavingWriter

type SavingWriter struct {
	Data [][]byte
}

SavingWriter is a writer that saves what it's passed

func (*SavingWriter) Write

func (sw *SavingWriter) Write(data []byte) (int, error)

Write appends data to sw.Data. It never fails.

Jump to

Keyboard shortcuts

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