Documentation ¶
Index ¶
- func BytesToRunes(bytea []byte) []rune
- func Constrain(val int, min int, max int) int
- func Constrain32(val int32, min int32, max int32) int32
- func DurWithin(val time.Duration, min time.Duration, max time.Duration) time.Duration
- func ExecCommand(command string) *exec.Cmd
- func IsTty() bool
- func Max(first int, items ...int) int
- func Max32(first int32, second int32) int32
- func Min32(first int32, second int32) int32
- func TrimLen(runes []rune) int
- func TrimRight(runes []rune) []rune
- type AtomicBool
- type EventBox
- type EventType
- type Events
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToRunes ¶
BytesToRunes converts byte array into rune array
func Constrain32 ¶
Constrain32 limits the given 32-bit integer with the upper and lower bounds
func ExecCommand ¶
ExecCommand executes the given command with $SHELL
Types ¶
type AtomicBool ¶
type AtomicBool struct {
// contains filtered or unexported fields
}
AtomicBool is a boxed-class that provides synchronized access to the underlying boolean value
func NewAtomicBool ¶
func NewAtomicBool(initialState bool) *AtomicBool
NewAtomicBool returns a new AtomicBool
func (*AtomicBool) Get ¶
func (a *AtomicBool) Get() bool
Get returns the current boolean value synchronously
func (*AtomicBool) Set ¶
func (a *AtomicBool) Set(newState bool) bool
Set updates the boolean value synchronously
type EventBox ¶
type EventBox struct {
// contains filtered or unexported fields
}
EventBox is used for coordinating events
Click to show internal directories.
Click to hide internal directories.