customWriter

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SizeCounter

type SizeCounter struct {
	TotalSize int64
}

SizeCounter 自定义的 Writer,用于统计读取的字节数 用途: 服务端转发r.Body的时候,不需要io.ReadAll 就可以获取到body的size

func (*SizeCounter) Write

func (s *SizeCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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