testutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCanonical

func GetCanonical(t *testing.T, raw string) string

GetCanonical converts the given JSON string into a canonical JSON.

func GetLoader

func GetLoader(t *testing.T) *jsonld.DocumentLoader

GetLoader returns document loader.

func MustParseURL

func MustParseURL(raw string) *url.URL

MustParseURL parses the given string and returns the URL. If the given string is not a valid URL then the function panics.

func NewMockID

func NewMockID(iri fmt.Stringer, path string) *url.URL

NewMockID returns a URL using the base IRI and the given path.

func NewMockURLs

func NewMockURLs(num int, getURI func(i int) string) []*url.URL

NewMockURLs returns the given number of URLs using the given function to format each one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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