Documentation ¶
Overview ¶
deepcopy deep copies maps, slices, etc. A standard copy will copy the pointers: deep copy copies the values pointed to.
Only what is needed has been implemented. Could make more dynamic, at the cost of reflection. Either adjust as needed or create a new function.
Copyright (c)2014, Joel Scoble (github.com/mohae), all rights reserved. License: MIT, for more details check the included LICENSE.txt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceToSliceOfInts ¶
func InterfaceToSliceOfInts(v interface{}) []int
InterfaceToSliceOfInts takes an interface that is a slice of ints and returns a deep copy of it as a slice of strings. An error is returned if the interface is not a slice of strings.
func InterfaceToSliceOfStrings ¶
func InterfaceToSliceOfStrings(v interface{}) []string
InterfaceToSliceOfStrings takes an interface that is a slice of strings and returns a deep copy of it as a slice of strings.
Types ¶
This section is empty.