utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvIntPtr

func ConvIntPtr[A, B constraints.Integer](a *A) *B

ConvIntPtr converts an integer pointer to another type

func ConvertNonce

func ConvertNonce(nonce []byte) *uint64

func IdPtr

func IdPtr[T any](value T) *T

IdPtr is the pointer version of id: 'a->'a

func MakeTimestamp

func MakeTimestamp(t time.Time) uint64

func Max

func Max[T constraints.Ordered](a, b T) T

func Min

func Min[T constraints.Ordered](a, b T) T

func SetTestingT

func SetTestingT(t *testing.T)

func WithErr

func WithErr[T any](_ T, err error) error

func WithoutErr

func WithoutErr[T any](v T, err error) T

Types

This section is empty.

Directories

Path Synopsis
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.

Jump to

Keyboard shortcuts

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