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: 0

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