Movatterモバイル変換


[0]ホーム

URL:


clonerex

package
v1.92.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:2Imported by:0

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package clonerex is an example package for the cloner tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcClone

func Clone(dst, srcany)bool

Clone duplicates src into dst and reports whether it succeeded.To succeed, <src, dst> must be of types <*T, *T> or <*T, **T>,where T is one of SliceContainer,InterfaceContainer,MapWithPointers,DeeplyNestedMap.

Types

typeCloneableadded inv1.90.0

type Cloneable interface {Clone()Cloneable}

Cloneable is an interface with a Clone method.

typeCloneableImpladded inv1.90.0

type CloneableImpl struct {Valueint}

CloneableImpl is a concrete type that implements Cloneable.

func (*CloneableImpl)Cloneadded inv1.90.0

func (c *CloneableImpl) Clone()Cloneable

typeDeeplyNestedMapadded inv1.92.0

type DeeplyNestedMap struct {ThreeLevels map[string]map[string]map[string]intFourLevels  map[string]map[string]map[string]map[string]*SliceContainer}

DeeplyNestedMap tests arbitrary depth of map nesting (3+ levels)

func (*DeeplyNestedMap)Cloneadded inv1.92.0

func (src *DeeplyNestedMap) Clone() *DeeplyNestedMap

Clone makes a deep copy of DeeplyNestedMap.The result aliases no memory with the original.

typeInterfaceContaineradded inv1.90.0

type InterfaceContainer struct {InterfaceCloneable}

InterfaceContainer has a pointer to an interface field, which teststhe special handling for interface types in the cloner.

func (*InterfaceContainer)Cloneadded inv1.90.0

Clone makes a deep copy of InterfaceContainer.The result aliases no memory with the original.

typeMapWithPointersadded inv1.92.0

type MapWithPointers struct {Nested          map[string]*intWithCloneMethod map[string]*SliceContainerCloneInterface  map[string]Cloneable}

func (*MapWithPointers)Cloneadded inv1.92.0

func (src *MapWithPointers) Clone() *MapWithPointers

Clone makes a deep copy of MapWithPointers.The result aliases no memory with the original.

typeSliceContainer

type SliceContainer struct {Slice []*int}

func (*SliceContainer)Clone

func (src *SliceContainer) Clone() *SliceContainer

Clone makes a deep copy of SliceContainer.The result aliases no memory with the original.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp