test

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONResponseRecorder

func NewJSONResponseRecorder[T any]() *httptestx.JSONResponseRecorder[Result[T]]

Types

type JSONResponseRecorder

type JSONResponseRecorder[T any] struct {
	*httptest.ResponseRecorder
}

func (JSONResponseRecorder[T]) MustScan

func (r JSONResponseRecorder[T]) MustScan() T

func (JSONResponseRecorder[T]) Scan

func (r JSONResponseRecorder[T]) Scan() (T, error)

type Result

type Result[T any] struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data T      `json:"data"`
}

Jump to

Keyboard shortcuts

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