utils

package
v0.0.0-...-cfab22a Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHttpParams

func CheckHttpParams(req *http.Request, keys map[string]string) (string, error)

检查http请求中必须的参数是否存在,空字符串也算不存在; 给出类型的,还要验证类型是否合法; 检查到不存在的key,或参数类型错误立即返回该key

func HandleQuitSignal

func HandleQuitSignal(f func())

func HandleSignal

func HandleSignal(f func(), sig ...os.Signal)

func OutputJsonResult

func OutputJsonResult(w http.ResponseWriter, result types.JsonResult)

输出JsonResult到http response

func ReadConfig

func ReadConfig(cfgFile string) (map[string]map[string]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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