util

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package util provides miscellaneous utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeNice

func BeNice(priority int) error

BeNice lets a Unix process reduce its own execution priority to avoid impacting other processes. Positive values have lower privilege (are nicer) while negative values have a higher privilege (are MEAN!).

func IsTTY added in v0.5.0

func IsTTY(f *os.File) bool

IsTTY determines if a file handle is attached to a TTY.

func LogRecover

func LogRecover()

LogRecover helps ensure any unhandled errors are logged. Useful as a `defer` function immediately upon entering a goroutine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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