utils

package
v0.0.0-...-434b910 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package utils contains functions supporting approval testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqual

func AssertEqual(t *testing.T, expected, actual interface{}, message string)

AssertEqual Example: AssertEqual(t, 10, number, "number")

func DoesFileExist

func DoesFileExist(fileName string) bool

DoesFileExist checks if a file exists.

func EnsureExists

func EnsureExists(fileName string)

EnsureExists creates if the file does not already exist.

func MapToString

func MapToString(collection interface{}, transform func(x interface{}) string) []string

MapToString maps a collection to a string collection

func PrintArray

func PrintArray(m interface{}) string

PrintArray prints an array

func PrintMap

func PrintMap(m interface{}) string

PrintMap prints a map

Types

This section is empty.

Jump to

Keyboard shortcuts

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