package
1.1.43
Repository: https://github.com/d0ngw/go.git
Documentation: pkg.go.dev

# Functions

CheckRedirectError if err is RedirectError ,then return redirect error.
CheckRequestError if err is RequestError,then return response status code and body.
ErrorFromRequestContext 从req的context取得错误值.
FromRequestContext 从req的context中取得key值.
GetFloat32Parameter 取得由name指定的32位浮点数参数值.
GetFloat64Parameter 取得由name指定的64位浮点数参数值.
GetInt32Parameter 取得由name指定的32位整数参数值.
GetInt64Parameter 取得由name指定的64位整数参数值.
GetParameter 取得由name指定的参数值.
GetURL 请求URL.
GetURLRaw 请求URL.
GetURLRawToWriter 请求URL.
GetURLRawToWriterWithContext 请求URL.
GetURLWithCookie 请求URL.
Merge 合并Middleware.
NewConfig 创建配置.
NewFailResp 构建失败的响应.
NewRedirectError redirect error.
NewRequestMetodMiddleware 用methods构建middleware.
NewResponseHandler 构建响应处理.
NewRetrivedCookieJar 构建PersistCookieJar.
NewSuccResp 构建成功的响应.
ParseParams 从r中解析参数,并填充到dest中,params应该是struct指针.
Post
Post Http Post.
PostURL 请求URL.
PostURLWithCookie 请求URL.
PostURLWithCookieAndHeader 请求URL.
RegJSONMarshaler 注册JSON Marshaler.
RenderHTML 渲染HTML.
RenderJSON 渲染JSON.
RenderTemplate 渲染模板.
RenderText 渲染Text.
RequestWithContext 向req的context中设置key = val,返回新的request.
RequestWithError 向req中设置当前处理的错误,返回新的request.
ToUnderlineName 将驼峰命名改为小写的下划线命名.

# Constants

http header.
http header.

# Structs

BaseController 表示一个控制器.
Config Http配置.
GraceableHandler 安全地关闭的处理器.
NoDirFS 不输出目录列表的FS.
RedirectError redirect error.
RequestError is the http request response error.
RequestMehotdMiddleware http请求方法.
Resp JSON Http响应.
ResponseHandler 响应处理.
RetrivedCookieJar 可持久化的Cookie.
Service Http服务.

# Interfaces

Controller 接口定义http处理器.
JSONMarshaler json marshaler.
Middleware 接口.

# Type aliases

MiddlewareFunc middleware函数.
PostPrepare prepare the post request before call client.Do(req).