errchan

package
v0.0.0-...-81cdbc7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: BSD-2-Clause Imports: 5 Imported by: 1

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrChan

type ErrChan struct {
	// contains filtered or unexported fields
}
Example
package main

import (
	"fmt"

	"github.com/ChrisRx/pkg/errchan"
)

func main() {
	e := errchan.New(100)
	e.Trace(fmt.Errorf("testing"))
	err := <-e.Errors()
	fmt.Println(err)
}
Output:

errchan/errchan_test.go:11 errchan_test.ExampleErrChan: testing

func New

func New(b int) *ErrChan

func (*ErrChan) Errors

func (e *ErrChan) Errors() <-chan error

func (*ErrChan) Send

func (e *ErrChan) Send(errs ...interface{}) error

func (*ErrChan) Trace

func (e *ErrChan) Trace(err error, args ...interface{}) error

type ErrorProducer

type ErrorProducer interface {
	Errors() <-chan error
}

Jump to

Keyboard shortcuts

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