util

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyWriter

type BodyWriter struct {
	gin.ResponseWriter
	Body *bytes.Buffer
}

定义新的struck,继承gin的ResponseWriter 添加body字段,用于将response暴露给日志

func (BodyWriter) Write

func (w BodyWriter) Write(b []byte) (int, error)

gin的ResponseWriter继承的底层http server 实现http的Write方法,额外添加一个body字段,用于获取response body

Jump to

Keyboard shortcuts

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