16 Star 61 Fork 23

DiDi-opensource/falcon-log-agent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
copy.go 811 Bytes
一键复制 编辑 原始数据 按行查看 历史
LiCheng 提交于 2018-12-06 17:39 . copy ParseSucc filed in DeepCopyStrategy
package utils
import "github.com/didi/falcon-log-agent/common/scheme"
func DeepCopyStrategy(ori *scheme.Strategy) *scheme.Strategy {
ret := &scheme.Strategy{
ID: ori.ID,
Name: ori.Name,
FilePath: ori.FilePath,
TimeFormat: ori.TimeFormat,
Pattern: ori.Pattern,
Interval: ori.Interval,
Tags: DeepCopyStringMap(ori.Tags),
Func: ori.Func,
Degree: ori.Degree,
Comment: ori.Comment,
ParseSucc: ori.ParseSucc,
}
return ret
}
func DeepCopyStringSlice(params []string) []string {
ret := make([]string, len(params))
for i, str := range params {
ret[i] = str
}
return ret
}
func DeepCopyStringMap(params map[string]string) map[string]string {
ret := make(map[string]string, len(params))
for k, v := range params {
ret[k] = v
}
return ret
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/didiopensource/falcon-log-agent.git
git@gitee.com:didiopensource/falcon-log-agent.git
didiopensource
falcon-log-agent
falcon-log-agent
542bf9e4eb8b

搜索帮助

D67c1975 1850385 1daf7b77 1850385