mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
15 lines
288 B
Go
15 lines
288 B
Go
package utils
|
|
|
|
import "encoding/json"
|
|
|
|
// Object 转化为 String
|
|
func ObjectToString(params interface{}) string {
|
|
bytes, _ := json.Marshal(params)
|
|
return BytesToString(bytes)
|
|
}
|
|
|
|
// 获取 RPC 参数
|
|
func GetRpcParam(key string, params map[string]string) string {
|
|
return params[key]
|
|
}
|