utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainChan

func DrainChan[In any](inChan <-chan In)

DrainChan drains the channel until it is closed. It is used to make sure that all the goroutines that have already written to the channel are finished. This is required for the case when the pipeline is interrupted, as otherwise the goroutines would be leaked.

func MapsEqual

func MapsEqual[K comparable, V comparable](m1 interface{}, m2 map[K]V) bool

func MultiMapsEqual

func MultiMapsEqual[K comparable, V comparable](m1 interface{}, m2 map[K][]V) bool

func SlicesEqual

func SlicesEqual[S ~[]E, E comparable](s1 interface{}, s2 S) bool

func SlicesEqualIgnoreOrder

func SlicesEqualIgnoreOrder[S ~[]E, E comparable](s1 interface{}, s2 S) bool

func StopSafely

func StopSafely(t *time.Timer)

StopSafely stops the timer if it is not nil.

func TimeNowAsRFC3339NanoString added in v0.0.4

func TimeNowAsRFC3339NanoString() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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