utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonIsEqual

func JsonIsEqual(t *testing.T, expectedJson, givenJson string)

JsonIsEqual checks if two json strings are equal.

func JsonToMap

func JsonToMap(s string) (m map[string]interface{}, err error)

JsonToMap parses json string and returns map.

func NewTestHttpClient added in v0.2.0

func NewTestHttpClient(h RoundTripHandler) (client *http.Client)

NewTestHttpClient returns http test client.

func ToJson

func ToJson(v interface{}) (s string, err error)

ToJson marshals any value to json string.

Types

type RoundTripHandler

type RoundTripHandler func(*http.Request) (*http.Response, error)

RoundTripHandler handler for test http client.

Jump to

Keyboard shortcuts

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