startup

package module
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: MIT Imports: 12 Imported by: 3

README

Build Status

startup

Yet another library to help writing services.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildGitHash string
View Source
var BuildPackage string
View Source
var BuildUnixTimestamp string
View Source
var BuildVersion string

Functions

func Close added in v1.2.6

func Close(closer io.Closer, onErrorMessage string)

func Errorf

func Errorf(msg string, args ...interface{}) error

func FatalOnError

func FatalOnError(err error, reason string, args ...interface{})

func MustParseCommandLine

func MustParseCommandLine(opts interface{})

func OpenWriter

func OpenWriter(name string) (io.Writer, error)

func PanicOnError

func PanicOnError(err error, msg string, args ...interface{})

func Panicf

func Panicf(msg string, args ...interface{})

func ParseCommandLine

func ParseCommandLine(opts interface{}) error

Parses command line.

Types

type BaseOptions

type BaseOptions struct {
	Logfile       string `long:"log-file" description:"Write logs to a different file. Defaults to stdout."`
	ForceColor    bool   `long:"log-color" description:"Forces colored output even on non TTYs."`
	JSONFormatter bool   `long:"log-json" description:"Log using the logrus json formatter."`

	Verbose bool `long:"verbose" description:"Show verbose logging output."`
	Version bool `long:"version" description:"Prints the build information about this application if available."`
}

func (*BaseOptions) Initialize

func (opts *BaseOptions) Initialize()

type StartupError

type StartupError error

Jump to

Keyboard shortcuts

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