util

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(tag string, err error)

check and log in error level

func CheckFatal

func CheckFatal(tag string, err error)

Types

type Debouncer

type Debouncer struct {
	// contains filtered or unexported fields
}

handle any message being posted to the debounce channel and start a new debounce period if no current period is running.

func NewDebouncer

func NewDebouncer(millis uint64, notify func(string)) Debouncer

Create a new debouncer

func (*Debouncer) Event

func (dbPtr *Debouncer) Event(tag string)

Send an event to request to start or join a debounce period

type SortedStringArray

type SortedStringArray []string

func (*SortedStringArray) IndexOf

func (ar *SortedStringArray) IndexOf(s string) int

func (SortedStringArray) Insert

Insert s into the array, and keep it sorted. Return the reference to a new sorted array

type StringSet

type StringSet SortedStringArray

func (StringSet) Add

func (set StringSet) Add(s string) *StringSet

Add a new string to set.

func (*StringSet) Compare

func (set *StringSet) Compare(that StringSet) bool

Check whether 2 sets are the same.

func (*StringSet) IndexOf

func (set *StringSet) IndexOf(s string) int

func (StringSet) ToString

func (set StringSet) ToString() string

Jump to

Keyboard shortcuts

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