Search Apps Documentation Source Content File Folder Download Copy Actions Download

getter_utils.gno

0.32 Kb · 19 lines
 1package governance
 2
 3func cloneInt64Slice(src []int64) []int64 {
 4	if src == nil {
 5		return nil
 6	}
 7	cloned := make([]int64, len(src))
 8	copy(cloned, src)
 9	return cloned
10}
11
12func cloneAddressSlice(src []address) []address {
13	if src == nil {
14		return nil
15	}
16	cloned := make([]address, len(src))
17	copy(cloned, src)
18	return cloned
19}