util

package
v0.0.0-...-b2170da Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterateArgs

func IterateArgs(args []string, f func(string))

Allows to run args processing when args is references for some entities Example: ```shell script sentimentd brain rm 1 2 3 // This command will remove brains with ID: 1, 2, 3 ```

func ParseInt64

func ParseInt64(idString string) (int64, error)

func PrintBrains

func PrintBrains(out io.Writer, brains []BrainInterface)

func WaitInterruption

func WaitInterruption(cb func())

WaitInterruption helps to wait OS interruption more easier way when custom signals handling is not required

Types

type LineIterator

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

func NewLineIterator

func NewLineIterator(rd io.Reader) *LineIterator

func (*LineIterator) Next

func (ln *LineIterator) Next() ([]byte, error)

Jump to

Keyboard shortcuts

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