Help us shape the future of Go! Take the 2026 Go Developer Survey

betterwr

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 3 Imported by: 0

README

betterwr

一个简单的 http.ResponseWriter 和 *http.Request 封装

支持 JSON 序列化, 反序列化

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BetterWR

type BetterWR struct {
	ResponseWriter http.ResponseWriter
	Request        *http.Request
}

func (*BetterWR) Header

func (ctx *BetterWR) Header() http.Header

func (*BetterWR) ReadJson

func (ctx *BetterWR) ReadJson(s any) error

func (*BetterWR) ReadText

func (ctx *BetterWR) ReadText() (string, error)

func (*BetterWR) WriteBytes

func (ctx *BetterWR) WriteBytes(b []byte) error

func (*BetterWR) WriteJson

func (ctx *BetterWR) WriteJson(s any) error

func (*BetterWR) WriteStatus

func (ctx *BetterWR) WriteStatus(code int)

func (*BetterWR) WriteText

func (ctx *BetterWR) WriteText(s string) error

Jump to

Keyboard shortcuts

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