config

package
v0.0.0-...-b38bbfa Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFile = kingpin.Flag("configFile", "Configuration File").Short('c').String() // TODO make it mandatory or have a sane default
	Verbose    = kingpin.Flag("verbose", "Verbose mode.").Short('v').Bool()
)

Functions

func GetVerboseLoggingFlag

func GetVerboseLoggingFlag() bool

func ParseCLI

func ParseCLI()

Types

type Config

type Config struct {
	ProjectDir        string
	ProjectName       string
	ScoDir            string
	ScoConfigFile     string
	VerboseOutput     bool
	Logger            *log_.Logger
	GitIgnore         *gitignore.GitIgnore // TODO rename into something git agnostiv like FileIgnore
	ScoDirPermissions os.FileMode
}

func New

func New(globalConfig *GlobalConfig, projectDefinition *ProjectConfig, logger *log_.Logger) *Config

type GlobalConfig

type GlobalConfig struct {
	Projects       []ProjectConfig `json:"projects"`
	IgnorePatterns []string        `json:"ignorePatterns"`
}

func ParseGlobalConfig

func ParseGlobalConfig(configFile string) *GlobalConfig

type ProjectConfig

type ProjectConfig struct {
	Name        string   `json:"name"`
	Path        string   `json:"path"`
	IgnoreFiles []string `json:"ignoreFiles"`
	ScoDir      string   `json:"scoDir"`
}

Jump to

Keyboard shortcuts

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