package
module
Version:
v0.0.0-...-2e9ef76
Opens a new window with list of versions in this module.
Published: Mar 5, 2022
License: LGPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
¶
Interface clones an interface pointer.
Map clones a map of cloneable values.
P creates a value pointer from a value. Use with care.
func Shallow[T any](x *T) *T
Shallow shallow clones (copies) a value.
func Slice[T Cloner[T]](xs []T) []T
Slice clones a slice of cloneable values.
func ValuePointer[V any, T interface {
Cloner[*V]
*V
}](x T) T
ValuePointer clones a value pointer.
type Cloner[T any] interface {
Clone() T
}
Cloner is what anything cloneable must implement.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.