IsString

package
v0.0.0-...-5012a73 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CAP = 10

CAP is the capacity of the buffered proxy channel

View Source
const QUE = 16

QUE is the allocated size of the circular queue

View Source
const ReaderCAP = 10

ReaderCAP is the capacity of the buffered proxy channel

View Source
const ReaderQUE = 16

ReaderQUE is the allocated size of the circular queue

View Source
const ReplacerCAP = 10

ReplacerCAP is the capacity of the buffered proxy channel

View Source
const ReplacerQUE = 16

ReplacerQUE is the allocated size of the circular queue

View Source
const StringSCAP = 10

StringSCAP is the capacity of the buffered proxy channel

View Source
const StringSQUE = 16

StringSQUE is the allocated size of the circular queue

Variables

This section is empty.

Functions

func Chan

func Chan(inp ...string) chan string

Chan returns a channel to receive all inputs before close.

func ChanFuncErr

func ChanFuncErr(act func() (string, error)) <-chan string

ChanFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanFuncNok

func ChanFuncNok(act func() (string, bool)) <-chan string

ChanFuncNok returns a channel to receive all results of act until nok before close.

func ChanReader

func ChanReader(inp ...*strings.Reader) chan *strings.Reader

ChanReader returns a channel to receive all inputs before close.

func ChanReaderFuncErr

func ChanReaderFuncErr(act func() (*strings.Reader, error)) <-chan *strings.Reader

ChanReaderFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanReaderFuncNok

func ChanReaderFuncNok(act func() (*strings.Reader, bool)) <-chan *strings.Reader

ChanReaderFuncNok returns a channel to receive all results of act until nok before close.

func ChanReaderSlice

func ChanReaderSlice(inp ...[]*strings.Reader) chan *strings.Reader

ChanReaderSlice returns a channel to receive all inputs before close.

func ChanReplacer

func ChanReplacer(inp ...*strings.Replacer) chan *strings.Replacer

ChanReplacer returns a channel to receive all inputs before close.

func ChanReplacerFuncErr

func ChanReplacerFuncErr(act func() (*strings.Replacer, error)) <-chan *strings.Replacer

ChanReplacerFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanReplacerFuncNok

func ChanReplacerFuncNok(act func() (*strings.Replacer, bool)) <-chan *strings.Replacer

ChanReplacerFuncNok returns a channel to receive all results of act until nok before close.

func ChanReplacerSlice

func ChanReplacerSlice(inp ...[]*strings.Replacer) chan *strings.Replacer

ChanReplacerSlice returns a channel to receive all inputs before close.

func ChanSlice

func ChanSlice(inp ...[]string) chan string

ChanSlice returns a channel to receive all inputs before close.

func ChanStringS

func ChanStringS(inp ...[]string) chan []string

ChanStringS returns a channel to receive all inputs before close.

func ChanStringSFuncErr

func ChanStringSFuncErr(act func() ([]string, error)) <-chan []string

ChanStringSFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanStringSFuncNok

func ChanStringSFuncNok(act func() ([]string, bool)) <-chan []string

ChanStringSFuncNok returns a channel to receive all results of act until nok before close.

func ChanStringSSlice

func ChanStringSSlice(inp ...[][]string) chan []string

ChanStringSSlice returns a channel to receive all inputs before close.

func Daisy

func Daisy(inp <-chan string, tube Tube) (out <-chan string)

Daisy returns a channel to receive all inp after having passed thru tube.

func DaisyChain

func DaisyChain(inp <-chan string, tubes ...Tube) (out <-chan string)

DaisyChain returns a channel to receive all inp after having passed thru all tubes.

func Done

func Done(inp <-chan string) chan struct{}

Done returns a channel to receive one signal before close after inp has been drained.

func DoneFunc

func DoneFunc(inp <-chan string, act func(a string)) chan struct{}

DoneFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneReader

func DoneReader(inp <-chan *strings.Reader) chan struct{}

DoneReader returns a channel to receive one signal before close after inp has been drained.

func DoneReaderFunc

func DoneReaderFunc(inp <-chan *strings.Reader, act func(a *strings.Reader)) chan struct{}

DoneReaderFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneReaderSlice

func DoneReaderSlice(inp <-chan *strings.Reader) chan []*strings.Reader

DoneReaderSlice returns a channel which will receive a slice of all the Readers received on inp channel before close. Unlike DoneReader, a full slice is sent once, not just an event.

func DoneReplacer

func DoneReplacer(inp <-chan *strings.Replacer) chan struct{}

DoneReplacer returns a channel to receive one signal before close after inp has been drained.

func DoneReplacerFunc

func DoneReplacerFunc(inp <-chan *strings.Replacer, act func(a *strings.Replacer)) chan struct{}

DoneReplacerFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneReplacerSlice

func DoneReplacerSlice(inp <-chan *strings.Replacer) chan []*strings.Replacer

DoneReplacerSlice returns a channel which will receive a slice of all the Replacers received on inp channel before close. Unlike DoneReplacer, a full slice is sent once, not just an event.

func DoneSlice

func DoneSlice(inp <-chan string) chan []string

DoneSlice returns a channel which will receive a slice of all the s received on inp channel before close. Unlike Done, a full slice is sent once, not just an event.

func DoneStringS

func DoneStringS(inp <-chan []string) chan struct{}

DoneStringS returns a channel to receive one signal before close after inp has been drained.

func DoneStringSFunc

func DoneStringSFunc(inp <-chan []string, act func(a []string)) chan struct{}

DoneStringSFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneStringSSlice

func DoneStringSSlice(inp <-chan []string) chan [][]string

DoneStringSSlice returns a channel which will receive a slice of all the StringSs received on inp channel before close. Unlike DoneStringS, a full slice is sent once, not just an event.

func Join

func Join(out chan<- string, inp ...string) chan struct{}

Join sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinChan

func JoinChan(out chan<- string, inp <-chan string) chan struct{}

JoinChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReader

func JoinReader(out chan<- *strings.Reader, inp ...*strings.Reader) chan struct{}

JoinReader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReaderChan

func JoinReaderChan(out chan<- *strings.Reader, inp <-chan *strings.Reader) chan struct{}

JoinReaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReaderSlice

func JoinReaderSlice(out chan<- *strings.Reader, inp ...[]*strings.Reader) chan struct{}

JoinReaderSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReplacer

func JoinReplacer(out chan<- *strings.Replacer, inp ...*strings.Replacer) chan struct{}

JoinReplacer sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReplacerChan

func JoinReplacerChan(out chan<- *strings.Replacer, inp <-chan *strings.Replacer) chan struct{}

JoinReplacerChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReplacerSlice

func JoinReplacerSlice(out chan<- *strings.Replacer, inp ...[]*strings.Replacer) chan struct{}

JoinReplacerSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinSlice

func JoinSlice(out chan<- string, inp ...[]string) chan struct{}

JoinSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinStringS

func JoinStringS(out chan<- []string, inp ...[]string) chan struct{}

JoinStringS sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinStringSChan

func JoinStringSChan(out chan<- []string, inp <-chan []string) chan struct{}

JoinStringSChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinStringSSlice

func JoinStringSSlice(out chan<- []string, inp ...[][]string) chan struct{}

JoinStringSSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func MakeChan

func MakeChan() chan string

MakeChan returns a new open channel (simply a 'chan string' that is).

Note: No '-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myPipelineStartsHere := MakeChan()
// ... lot's of code to design and build Your favourite "myWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myPipelineStartsHere <- drop
}
close(myPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeBuffer) the channel is unbuffered.

func MakeReaderChan

func MakeReaderChan() chan *strings.Reader

MakeReaderChan returns a new open channel (simply a 'chan *strings.Reader' that is).

Note: No 'Reader-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myReaderPipelineStartsHere := MakeReaderChan()
// ... lot's of code to design and build Your favourite "myReaderWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myReaderPipelineStartsHere <- drop
}
close(myReaderPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeReaderBuffer) the channel is unbuffered.

func MakeReplacerChan

func MakeReplacerChan() chan *strings.Replacer

MakeReplacerChan returns a new open channel (simply a 'chan *strings.Replacer' that is).

Note: No 'Replacer-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myReplacerPipelineStartsHere := MakeReplacerChan()
// ... lot's of code to design and build Your favourite "myReplacerWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myReplacerPipelineStartsHere <- drop
}
close(myReplacerPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeReplacerBuffer) the channel is unbuffered.

func MakeStringSChan

func MakeStringSChan() chan []string

MakeStringSChan returns a new open channel (simply a 'chan []string' that is).

Note: No 'StringS-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myStringSPipelineStartsHere := MakeStringSChan()
// ... lot's of code to design and build Your favourite "myStringSWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myStringSPipelineStartsHere <- drop
}
close(myStringSPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeStringSBuffer) the channel is unbuffered.

func PipeBuffer

func PipeBuffer(inp <-chan string, cap int) chan string

PipeBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeFork

func PipeFork(inp <-chan string) (chan string, chan string)

PipeFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeFunc

func PipeFunc(inp <-chan string, act func(a string) string) chan string

PipeFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeMap for functional people, but 'map' has a very different meaning in go lang.

func PipeReaderBuffer

func PipeReaderBuffer(inp <-chan *strings.Reader, cap int) chan *strings.Reader

PipeReaderBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeReaderFork

func PipeReaderFork(inp <-chan *strings.Reader) (chan *strings.Reader, chan *strings.Reader)

PipeReaderFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeReaderFunc

func PipeReaderFunc(inp <-chan *strings.Reader, act func(a *strings.Reader) *strings.Reader) chan *strings.Reader

PipeReaderFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeReaderMap for functional people, but 'map' has a very different meaning in go lang.

func PipeReplacerBuffer

func PipeReplacerBuffer(inp <-chan *strings.Replacer, cap int) chan *strings.Replacer

PipeReplacerBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeReplacerFork

func PipeReplacerFork(inp <-chan *strings.Replacer) (chan *strings.Replacer, chan *strings.Replacer)

PipeReplacerFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeReplacerFunc

func PipeReplacerFunc(inp <-chan *strings.Replacer, act func(a *strings.Replacer) *strings.Replacer) chan *strings.Replacer

PipeReplacerFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeReplacerMap for functional people, but 'map' has a very different meaning in go lang.

func PipeStringSBuffer

func PipeStringSBuffer(inp <-chan []string, cap int) chan []string

PipeStringSBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeStringSFork

func PipeStringSFork(inp <-chan []string) (chan []string, chan []string)

PipeStringSFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeStringSFunc

func PipeStringSFunc(inp <-chan []string, act func(a []string) []string) chan []string

PipeStringSFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeStringSMap for functional people, but 'map' has a very different meaning in go lang.

func ReaderDaisy

func ReaderDaisy(inp <-chan *strings.Reader, tube ReaderTube) (out <-chan *strings.Reader)

ReaderDaisy returns a channel to receive all inp after having passed thru tube.

func ReaderDaisyChain

func ReaderDaisyChain(inp <-chan *strings.Reader, tubes ...ReaderTube) (out <-chan *strings.Reader)

ReaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func ReplacerDaisy

func ReplacerDaisy(inp <-chan *strings.Replacer, tube ReplacerTube) (out <-chan *strings.Replacer)

ReplacerDaisy returns a channel to receive all inp after having passed thru tube.

func ReplacerDaisyChain

func ReplacerDaisyChain(inp <-chan *strings.Replacer, tubes ...ReplacerTube) (out <-chan *strings.Replacer)

ReplacerDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func SendProxy

func SendProxy(out chan<- string) chan<- string

SendProxy returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func SendProxyReader

func SendProxyReader(out chan<- *strings.Reader) chan<- *strings.Reader

SendProxyReader returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func SendProxyReplacer

func SendProxyReplacer(out chan<- *strings.Replacer) chan<- *strings.Replacer

SendProxyReplacer returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func SendProxyStringS

func SendProxyStringS(out chan<- []string) chan<- []string

SendProxyStringS returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func StringSDaisy

func StringSDaisy(inp <-chan []string, tube StringSTube) (out <-chan []string)

StringSDaisy returns a channel to receive all inp after having passed thru tube.

func StringSDaisyChain

func StringSDaisyChain(inp <-chan []string, tubes ...StringSTube) (out <-chan []string)

StringSDaisyChain returns a channel to receive all inp after having passed thru all tubes.

Types

type BasicInfo

type BasicInfo int

BasicInfo is a set of flags describing properties of a basic type.

const (
	IsBoolean BasicInfo = 1 << iota
	IsInteger
	IsUnsigned
	IsFloat
	IsComplex
	IsString
	IsUntyped

	IsOrdered   = IsInteger | IsFloat | IsString
	IsNumeric   = IsInteger | IsFloat | IsComplex
	IsConstType = IsBoolean | IsNumeric | IsString
)

Properties of basic types.

type BasicKind

type BasicKind int

BasicKind describes the kind of basic type.

type ReaderTube

type ReaderTube func(inp <-chan *strings.Reader, out <-chan *strings.Reader)

ReaderTube is the signature for a pipe function.

type ReplacerTube

type ReplacerTube func(inp <-chan *strings.Replacer, out <-chan *strings.Replacer)

ReplacerTube is the signature for a pipe function.

type StringSTube

type StringSTube func(inp <-chan []string, out <-chan []string)

StringSTube is the signature for a pipe function.

type Tube

type Tube func(inp <-chan string, out <-chan string)

Tube is the signature for a pipe function.

Jump to

Keyboard shortcuts

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