util

package
v0.0.0-...-33f8601 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GitTime git log中记录的提交时间.
	GitTime = ""
	// GitMessage git log 中记录的提交信息.
	GitMessage = ""
)
View Source
var (
	//AesKey 内部用的简单aes key.
	AesKey = "9F4CrTJJVynV6NJL"
)

Functions

func DecodeRequestValue

func DecodeRequestValue(req *http.Request, result interface{}) error

DecodeRequestValue 解析request中数据.

func DoRequest

func DoRequest(req *http.Request) ([]byte, int, error)

DoRequest 直接发送请求

func LocalAddr

func LocalAddr() string

LocalAddr 本机地址

func PrintVersion

func PrintVersion()

PrintVersion 输出当前程序编译信息.

func Request

func Request(method, url string, headers map[string]string, body io.Reader) ([]byte, int, error)

Request 调用远程http服务.

func SendResponse

func SendResponse(w http.ResponseWriter, status int, f string, args ...interface{})

SendResponse 返回结果,支持json

func SendResponseJSON

func SendResponseJSON(w http.ResponseWriter, data interface{})

SendResponseJSON 返回结果,支持json

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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