Interfaces

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup[T any](value any) T

Cleanup calls the Cleanup method of the given object if it implements the Cleanable interface. It returns a zero value of the given type.

Types

type Cleanable

type Cleanable interface {
	// Cleanup is called when the object is no longer needed.
	// This is useful for cleaning up resources such as file handles.
	Cleanup()
}

Jump to

Keyboard shortcuts

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