mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
12 lines
304 B
Go
12 lines
304 B
Go
package mlrval
|
|
|
|
// TODO: comment about mvtype; deferrence; copying of deferrence.
|
|
func (mv *Mlrval) Copy() *Mlrval {
|
|
other := *mv
|
|
if mv.mvtype == MT_MAP {
|
|
other.intf = mv.intf.(*Mlrmap).Copy()
|
|
} else if mv.mvtype == MT_ARRAY {
|
|
other.intf = CopyMlrvalArray(mv.intf.([]*Mlrval))
|
|
}
|
|
return &other
|
|
}
|