response

package
v0.0.0-...-74b6a7b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatusLowerText

func GetStatusLowerText(code int) string

GetStatusLowerText 获取状态码的小写文本描述

func GetStatusText

func GetStatusText(code int) string

GetStatusText 获取状态码的文本描述

Types

type Writer

type Writer interface {
	// Flusher 继承 http.Flusher
	http.Flusher

	// Hijacker 继承 http.Hijacker
	http.Hijacker

	// ResponseWriter 继承 http.ResponseWriter
	http.ResponseWriter

	// GetStatusCode 获取响应状态码
	GetStatusCode() int
}

Writer 自定义 HTTP 的 响应接口,继承 http.ResponseWriter

func NewWriter

func NewWriter(resp http.ResponseWriter) Writer

NewWriter 创建一个基于 http.ResponseWriter 的响应

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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