pkgutils

package
v0.1.0-pre-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHTTPResponse

func CreateHTTPResponse(respcode int, data ...string) *http.Response

CreateHTTPResponse - helper to create an http response for test cases body parameters:

response code:
data[0] response body
data[1] http status
data[x*2 - 1] = http header where x > 1
data[x*2] = http header value

func DumpJSON

func DumpJSON(i interface{}) []byte

DumpJSON - output formatted json from a go struct to byte array which can then be output to the console for example

e.g. fmt.Println(string(DumpJSON(mystruct)))

Types

This section is empty.

Jump to

Keyboard shortcuts

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