outcheck

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package outcheck provides a utility to check if the output of a template function matches a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

func New

func New(t *testing.T, expectFile string) *Checker

New creates a new Checker, that will check if the output written to it matches that of expectFile.

The check is performed automatically at the end of the test through testing.T.Cleanup.

func (*Checker) Write

func (c *Checker) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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