group

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Group is a lazy load container.

func NewGroup

func NewGroup(new func() interface{}) *Group

NewGroup news a group container.

func (*Group) Clear

func (g *Group) Clear()

Clear deletes all objects.

func (*Group) Get

func (g *Group) Get(key string) interface{}

Get gets the object by the given key.

func (*Group) Reset

func (g *Group) Reset(new func() interface{})

Reset resets the new function and deletes all existing objects.

Jump to

Keyboard shortcuts

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