prototype

package
v0.0.0-...-a7c7adb Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICloneable

type ICloneable interface {
	Clone() ICloneable
}

定义克隆接口

type IUserFactory

type IUserFactory interface {
	Create() *UserInfo
}

IUserFactory 工厂函数

var DefaultUserFactory IUserFactory = newUserFactory()

DefaultUserFactory 用户工厂的全局单例

type UserInfo

type UserInfo struct {
	ID       int
	Name     string
	RoleList []string
}

func (*UserInfo) Clone

func (u *UserInfo) Clone() ICloneable

克隆

Jump to

Keyboard shortcuts

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