testutil

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package testutil provides some utility functions for Go tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dwimjs

func Dwimjs(x interface{}) interface{}

Dwimjs, when given a string or bytes, parses that data as JSON. When given anything else, just returns what's given.

See https://en.wikipedia.org/wiki/DWIM.

func JS

func JS(x interface{}) string

JS renders its argument as JSON or as a string indicating an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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