module
Version:
v0.0.0-...-58dc058
Opens a new window with list of versions in this module.
Published: Aug 7, 2020
License: MIT
Opens a new window with license information.
README
¶
基础包
日志
github.com/fideism/golang-tools/logger
使用 logger.Channel("sms")
指定特定的channel
,方便日志收集
具体使用 Readme
参数
Params util.Params
import "github.com/fideism/golang-tools/util"
// Params map[string]interface{}
type Params map[string]interface{}
// Set 设置值
func (p Params) Set(k string, v interface{})
// Get 获取值
func (p Params) Get(k string) (v interface{})
// GetString 强制获取k对应的v string类型
func (p Params) GetString(k string) string
// Exists 判断是否存在
func (p Params) Exists(k string) bool
//具体使用
p := util.Params{
"openid": "xx",
}
// also can
p.Set("notify_url", "https://github.com/fideism/golang-wechat")
// InterfaceToString 不定类型强转string
InterfaceToString
Directories
¶
|
|
db
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.