carpy

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageName   = "carpy"
	InterfaceName = "Copy"
)

Variables

This section is empty.

Functions

func Gen added in v0.1.9

func Gen(base string)

func GetTypeName

func GetTypeName(obj any) string

Types

type Carpy added in v0.1.9

type Carpy struct {
	// contains filtered or unexported fields
}

func (*Carpy) FindCopyPkg added in v0.1.9

func (c *Carpy) FindCopyPkg(pkgs *openapi.Packages)

FindPkgCopyInfo 查找包下所有拷贝信息

func (*Carpy) FindCopyStruct added in v0.1.9

func (c *Carpy) FindCopyStruct()

FindCopyStruct 查找所有需要复制的类型

func (*Carpy) Gen added in v0.1.9

func (c *Carpy) Gen(base string)

Gen 生成

type Copy

type Copy interface {
	Copy(to any, from any) error
}

Copy 用于拷贝的接口 在生成文件中将生成该接口的实现体

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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