singleton

package
v0.52.5 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstance added in v0.48.0

func GetInstance[T any](constructor func() T) T

GetInstance returns an existing instance of object. If it is not yet created, calls `constructor`, stores the result for future calls and returns it

Types

This section is empty.

Jump to

Keyboard shortcuts

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