mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
18 lines
549 B
Go
18 lines
549 B
Go
// Copyright 2017 gf Author(https://github.com/gogf/gf). All Rights Reserved.
|
|
//
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
// If a copy of the MIT was not distributed with this file,
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
// Package gutil provides utility functions.
|
|
package gutil
|
|
|
|
// CopyMap does memory from map <data> to <copy>.
|
|
func CopyMap(data map[string]interface{}) (copy map[string]interface{}) {
|
|
copy = make(map[string]interface{}, len(data))
|
|
for k, v := range data {
|
|
copy[k] = v
|
|
}
|
|
return
|
|
}
|