utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atoi

func Atoi(id string) int

Atoi func

func CopyRequest

func CopyRequest(req *http.Request) *http.Request

CopyRequest copy request from a http.Request

func EncodeFormToString

func EncodeFormToString(req *http.Request) string

EncodeFormToString ... you must copy http.Request manually

func Fstring

func Fstring(format string, v ...interface{}) string

Fstring ...

func ParseRequestForm

func ParseRequestForm(cpyReq *http.Request) url.Values

ParseRequestForm parse request and get form form body or url nomarlly support "application/www-form-urlencodeded" header TODO: ParseMultipartForm with Content-Type multipart/form-data

func ParseURIPrefix

func ParseURIPrefix(uri string) string

ParseURIPrefix ... 1. prefix/uri; 2 /prefix/uri

func ResponseJSON

func ResponseJSON(w http.ResponseWriter, i interface{})

ResponseJSON ...

func ResponseString

func ResponseString(w http.ResponseWriter, s string)

ResponseString ...

func StringEncMd5

func StringEncMd5(s string) string

StringEncMd5 ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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