rtutils

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = fmt.Errorf("Timed out")

Functions

func Closer

func Closer(closer func() error, rerr *error)

Closer is a convenience function that addresses the use-case of wanting to defer a Close() method that returns an error By using this function you can pass it the error the function returned as the second argument, if both the closer and the function error are not-nil the function error will get wrapped by the closer error, albeit with a new error struct, so the types and parent structure of the closer error would be lost if you use this function

func CurrentFile

func CurrentFile() string

Returns path of currently running Go file

func Timeout

func Timeout(cb func() error, t time.Duration) error

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