test

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 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