testutil

package
v0.0.0-...-bf75c1d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package testutil provides utilities for testing #nosec Only used for tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrFile

func CrFile(t *testing.T, path string) []byte

CrFile returns a Buffer with each line ending with \r\n

func CrReader

func CrReader(t *testing.T, path string) io.Reader

CrReader returns a Reader to a test file and ensures each line ends with \r\n

func FromJSONFile

func FromJSONFile(t *testing.T, path string, data interface{})

FromJSONFile reads the given json file into the given data structure

func ToJSONFile

func ToJSONFile(t *testing.T, path string, data interface{})

ToJSONFile write the given data structure into a json file

Types

This section is empty.

Jump to

Keyboard shortcuts

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