config

package
v0.0.0-...-3ff763c Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2016 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const Version = "0.0.1"

Version is the semantic version of the program.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *logrus.Entry

GetLogger is a convenience function that returns a logrus logger with the "name" field already filled out.

func SetupLogging

func SetupLogging(verbose, quiet, disableColors, forceColors bool, logFile string) (err error)

SetupLogging configures the global logrus instance based on user-supplied data.

:param verbose: Enable debug logging.

:param quiet: Disable any logging to the console.

:param disableColors: Disable color log levels and field keys.

:param forceColors: Force showing colors (for testing).

:param logFile: Log to this file path in addition to the console.

Types

type Config

type Config struct {
	NoColors   bool
	NoReleases bool
	NoPrivate  bool
	NoForks    bool
	NoGist     bool
	NoIssues   bool
	LogFile    string
	NoComments bool
	NoPublic   bool
	Quiet      bool
	NoRepos    bool
	Token      string
	NoPrompt   bool
	User       string
	Verbose    bool
	Overwrite  bool
	NoWikis    bool

	Destination string
}

Config holds parsed data from command line arguments.

func NewConfig

func NewConfig(argv []string) (Config, error)

NewConfig populates the struct with data read from command line arguments using docopt.

:param argv: CLI arguments to pass to docopt.Parse().

Jump to

Keyboard shortcuts

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