common

package
v0.0.0-...-7bad096 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonAction

func CommonAction(r *http.Request, w http.ResponseWriter)

CommonAction 通用请求处理逻辑 记录请求日志,用于统计和分析

func RedirectPage

func RedirectPage(w http.ResponseWriter, title, message, toUrl string, httpCode, waitSecond int)

RedirectPage 显示跳转页面 title: 页面标题,message: 提示消息,toUrl: 跳转地址,httpCode: HTTP状态码,waitSecond: 等待秒数

func SendResult

func SendResult(w http.ResponseWriter, status int, message string, data interface{}) (err error)

SendResult 发送JSON格式的响应结果 status: 状态码,message: 消息,data: 数据

func TrimHtml

func TrimHtml(src string) string

TrimHtml 去除HTML标签,提取纯文本内容 src: 包含HTML的字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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