testutils

package
v0.0.0-...-80236ea Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesEqual

func BytesEqual(t *testing.T, want, got []byte) bool

func ErrorEqual

func ErrorEqual(t *testing.T, want, got error) bool

func Int64ToByte

func Int64ToByte(i int64) []byte

Int64ToByte converts an int64 value to a byte slice.

func ToByte

func ToByte(val any) []byte

ToByte converts an struct value to a byte's slice. It will return a empty byte's slice in error

Types

type EchoContext

type EchoContext struct {
	echo.Context
	Rec *httptest.ResponseRecorder
}

func NewEchoContext

func NewEchoContext(ctx context.Context, body []byte) *EchoContext

func (*EchoContext) WithParam

func (c *EchoContext) WithParam(key, value string) *EchoContext

Jump to

Keyboard shortcuts

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