copier

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFd

func ConvertFd[S any, D any](fd string, converter converter.Converter[S, D]) option.Opt[copyConf]

func IgnoreFds

func IgnoreFds(fds ...string) option.Opt[copyConf]

Types

type Copier

type Copier[S any, D any] interface {
	Copy(src *S) (*D, error)
	CopyTo(src *S, dst *D) error
}

Copier is a type that can copy a source object to a destination object.

type RefCopier

type RefCopier[S any, D any] struct {
	// contains filtered or unexported fields
}

func NewRefCopier

func NewRefCopier[S any, D any](opts ...option.Opt[copyConf]) (*RefCopier[S, D], error)

func (*RefCopier[S, D]) Copy

func (rc *RefCopier[S, D]) Copy(src *S, opts ...option.Opt[copyConf]) (*D, error)

func (*RefCopier[S, D]) CopyTo

func (rc *RefCopier[S, D]) CopyTo(src *S, dst *D, opts ...option.Opt[copyConf]) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL