Help us shape the future of Go! Take the 2026 Go Developer Survey

pool

package
v2.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 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 Factory

type Factory[T any] struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory[T any](new func(name string) (T, error)) *Factory[T]

NewFactory 创建单例工厂

func (*Factory[T]) Get

func (f *Factory[T]) Get(name string) (T, error)

Get 获取单例对象

Jump to

Keyboard shortcuts

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