testx

package
v0.0.83 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(s *http.Server, url string, opts ...requestOption) *httptest.ResponseRecorder

func DeleteJson

func DeleteJson[T any](s *http.Server, url string, opts ...requestOption) (*httptest.ResponseRecorder, T)

func GetJson

func GetJson[T any](s *http.Server, url string, opts ...requestOption) (*httptest.ResponseRecorder, T)

func PatchJson

func PatchJson[T any](s *http.Server, url string, jsonStr string, opts ...requestOption) (*httptest.ResponseRecorder, T)

func PostJson

func PostJson[T any](s *http.Server, url string, jsonStr string, opts ...requestOption) (*httptest.ResponseRecorder, T)

func PutJson

func PutJson[T any](s *http.Server, url string, jsonStr string, opts ...requestOption) (*httptest.ResponseRecorder, T)

func WithHeader added in v0.0.61

func WithHeader(key, value string) requestOption

Types

type ConcurrentBuffer added in v0.0.73

type ConcurrentBuffer struct {
	// contains filtered or unexported fields
}

func NewConcurrentBuffer added in v0.0.73

func NewConcurrentBuffer(t *testing.T) *ConcurrentBuffer

func (*ConcurrentBuffer) String added in v0.0.73

func (c *ConcurrentBuffer) String() string

func (*ConcurrentBuffer) Write added in v0.0.73

func (c *ConcurrentBuffer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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