utils

package
v0.0.0-...-8c259ab Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOnExitFunc

func AddOnExitFunc(onExit ExitFunc)

func SetUpProcessInterrupt

func SetUpProcessInterrupt()

Sets up receiver for OS interrupt signal.

To run code when that happens, add functions via the AddOnExitFunc(func()) process

func WrapChannel

func WrapChannel[T any, U any](input <-chan T, mapper MapperFunc[T, U]) <-chan U

WrapChannel wraps an input channel into another channel using a mapper function

Types

type ExitFunc

type ExitFunc func()

type MapperFunc

type MapperFunc[T any, U any] func(T) U

Jump to

Keyboard shortcuts

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