package
0.0.0-20201102054017-282493799a89
Repository: https://github.com/golangltd/leafltd.git
Documentation: pkg.go.dev

# Functions

IsText reports whether a significant prefix of s looks like correct UTF-8; that is, if it is likely that s is human-readable text.
IsTextFile reports whether the file has a known extension indicating a text file, or if a significant chunk of the specified file looks like correct UTF-8; that is, if it is likely that the file contains human- readable text.
NewThrottle creates a new Throttle with a throttle value r and a minimum allocated run time slice of dt: r == 0: "empty" throttle; the goroutine is always sleeping r == 1: full throttle; the goroutine is never sleeping A value of r == 0.6 throttles a goroutine such that it runs approx.

# Structs

An RWValue wraps a value and permits mutually exclusive access to it and records the time the value was last set.
A Throttle permits throttling of a goroutine by calling the Throttle method repeatedly.