typeutil

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntToBool

func IntToBool[T Signed](a T) bool

func Keys

func Keys[K comparable, V any](m map[K]V) []K

Keys returns a slice of the keys of the map. based with go 1.18 generics

func Reverse

func Reverse[T any](s []T) []T

func TimeEpoch

func TimeEpoch(epoch int64) time.Time

func TimeStamp

func TimeStamp(stamp int64) time.Time

Types

type Signed added in v0.4.6

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

Signed is a constraint that permits any signed integer type. If future releases of Go add new predeclared signed integer types, this constraint will be modified to include them.

Jump to

Keyboard shortcuts

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