utils

package
v0.0.0-...-03f3354 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2015 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package utils exports few handy functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupEnv

func CleanupEnv(cfg *config.Config) error

Function to be called on application shutdown. Will remove the pidfile.

func FileExists

func FileExists(filePath string) bool

FileExists returns true if filePath is already existing regular file. It is a directory FileExists will return false.

func SetupEnv

func SetupEnv(cfg *config.Config) error

SetupEnv will create pidfile and possibly change the workdir. !TODO: add SetupEnv and CleanupEnv into Application?

Types

type CompositeError

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

*NOT* concurrently save error saving a multiple of errors

func (*CompositeError) AppendError

func (c *CompositeError) AppendError(err error)

append an error

func (*CompositeError) Empty

func (c *CompositeError) Empty() bool

func (*CompositeError) Error

func (c *CompositeError) Error() string

returns a string representation of all errors in the order they were appended

Jump to

Keyboard shortcuts

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