value

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package value contains utilities for working with generic values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Construct

func Construct[T any]() T

func IsNewable

func IsNewable[T any]() (bool, func() T)

func New

func New[T Newable]() T

Types

type Constructor

type Constructor[T any] func() T

func ConstructorFor

func ConstructorFor[T any]() Constructor[T]

type Newable

type Newable interface {
	int | int8 | int16 | int32 | int64 |
		uint | uint8 | uint16 | uint32 | uint64 | uintptr |
		float32 | float64 | complex64 | complex128 |
		bool | string
}

Jump to

Keyboard shortcuts

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