Contents

go第三方库-Github.com.mitchellh.copystructure

Contents

godoc

github官网

用法

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
input := map[string]interface{}{
	"bob": map[string]interface{}{
		"emails": []string{"a", "b"},
	},
}

dup, err := Copy(input)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", dup)
 |