utils

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeSend

func SafeSend[T any](ch chan T, t T) bool

SafeSend is a helper function that sends a value on a channel and returns. It is safe to use with closed channels. It uses go generics to allow for any type of channel.

func Sha256d

func Sha256d(b []byte) []byte

Sha256d calculates hash(hash(b)) and returns the resulting bytes.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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