testutil

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkDecode

func BenchmarkDecode[T any](b *testing.B, opt EncodingOptions[T])

func BenchmarkEncode

func BenchmarkEncode[T any](b *testing.B, opt EncodingOptions[T])

func BenchmarkEncoding

func BenchmarkEncoding[T any](b *testing.B, opt EncodingOptions[T])

func NewRequest

func NewRequest(method, url, body string, header map[string]string) *fasthttp.RequestCtx

NewRequest returns a new fasthttp.RequestCtx with the given method, url, body and header.

func TestDecode

func TestDecode[T any](t *testing.T, opt EncodingOptions[T])

func TestEncode

func TestEncode[T any](t *testing.T, opt EncodingOptions[T])

func TestEncoding

func TestEncoding[T any](t *testing.T, opt EncodingOptions[T])

func TestRouter

func TestRouter(t *testing.T, r don.Router, handler fasthttp.RequestHandler, basePath string)

Types

type EncodingOptions

type EncodingOptions[T any] struct {
	Mime   string
	Parsed T
	Raw    string
}

Jump to

Keyboard shortcuts

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