utils

package module
v0.0.0-...-f08a1f0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2016 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseOnFail

func CloseOnFail(success bool, closable Closable)

func EnsureDir

func EnsureDir(path string) error

func EnsureDirs

func EnsureDirs(paths ...string) error

func GetFiles

func GetFiles(path string) ([]string, error)

func GetFilteredFiles

func GetFilteredFiles(path string, filter string) ([]string, error)

func HandleError

func HandleError(logger *logging.Logger, message string, err error)

func HandleErrorWithoutLogger

func HandleErrorWithoutLogger(message string, err error)

func IsEndOfFileError

func IsEndOfFileError(err error) bool

func IsExist

func IsExist(path string) (bool, error)

func TryCloseOnFail

func TryCloseOnFail(success bool, closable TryClosable) error

Types

type Closable

type Closable interface {
	Close()
}

type Stopper

type Stopper struct {
	Stopping chan struct{}
	// contains filtered or unexported fields
}

func NewStopper

func NewStopper() *Stopper

func (*Stopper) Add

func (s *Stopper) Add()

func (*Stopper) Done

func (s *Stopper) Done()

func (*Stopper) Join

func (s *Stopper) Join()

func (*Stopper) Stop

func (s *Stopper) Stop()

func (*Stopper) WaitDone

func (s *Stopper) WaitDone()

type TryClosable

type TryClosable interface {
	Close() error
}

Jump to

Keyboard shortcuts

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