util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ping = Signal{}

Functions

func AsyncAssert

func AsyncAssert(t testing.TB, done chan Signal) *assert.Assertions

func AsyncRun

func AsyncRun(f func()) (done chan Signal)

func AsyncRunAtMost

func AsyncRunAtMost(t testing.TB, f func(), timeout time.Duration)

func Merge

func Merge[T any](base, patch T) (merged T)

func SplitLines

func SplitLines(s string) []string

SplitLines - method useful when iterating over lines in a string. It returns a slice of strings, each one being a single line. If the last couple of lines are newline characters, they are trimmed.

Types

type Signal

type Signal struct{}

type StartStopper

type StartStopper interface {
	Starter
	Stopper
}

type Starter

type Starter interface {
	Start()
}

type Stopper

type Stopper interface {
	Stop()
}

Jump to

Keyboard shortcuts

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