Skip to content

Commit 9804a17

Browse files
committed
增加合并数据函数
1 parent afef4ca commit 9804a17

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tailor.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ func ClipMore(keys []string, results []Object) []Object {
3131
return clipeds
3232
}
3333

34+
/* 增加合并数据函数 */
35+
func Merge(first, second Object) Object {
36+
for k, v := range second {
37+
first[k] = v
38+
}
39+
return first
40+
}
41+
3442
/* 隐藏名字 */
3543
func HideName(key string, result Object) {
3644
if nil == result {

0 commit comments

Comments
 (0)