internal

package
v0.0.0-...-d041062 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanvasFromText

func CanvasFromText(id, name string, s string) *ascanvas.Canvas

func CanvasJsonFromText

func CanvasJsonFromText(id string, name string, s string) string

func Closed

func Closed(c io.Closer)

Closed is differable closure of Closable items with nil checking

func IsContextDone

func IsContextDone(ctx context.Context) bool

IsContextDone is a helper to check if a context.Context is done

Types

type HttpTest

type HttpTest struct {
	// Request details we will be sending
	Request HttpTestRequest

	// Want stuffs
	Want HttpTestWant
}

HttpTest case with assertions

func (HttpTest) Assert

func (h HttpTest) Assert(t *testing.T, handler http.HandlerFunc) bool

Assert all as per Want

type HttpTestRequest

type HttpTestRequest struct {
	Path   string
	Method string
	Header http.Header
	Body   string
}

type HttpTestWant

type HttpTestWant struct {
	Status int
	Header http.Header
	Body   string
}

Jump to

Keyboard shortcuts

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