jsonhelper

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertJSON

func AssertJSON(want, got []byte) error

func AssertResponse

func AssertResponse(t *testing.T, got *http.Response, status int, body []byte)

func WriteJSONResponse

func WriteJSONResponse(ctx context.Context, w http.ResponseWriter, body any, status int) error

Types

type ErrorResponse

type ErrorResponse struct {
	Message string   `json:"message"`
	Detail  []string `json:"detail,omitempty"`
}

Jump to

Keyboard shortcuts

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