route/vendor/github.com/mitchellh/copystructure/copystructure_examples_test.go

23 lines
357 B
Go

package copystructure
import (
"fmt"
)
func ExampleCopy() {
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)
// Output:
// map[string]interface {}{"bob":map[string]interface {}{"emails":[]string{"a", "b"}}}
}