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

23 lines
357 B
Go
Raw Normal View History

2017-12-02 23:34:35 +00:00
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"}}}
}