config

package
v0.0.0-...-518a77e Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(filename string) error

InitConfig initialize config by config file

func InitDefaultConfig

func InitDefaultConfig() error

InitDefaultConfig initialize default configuration

func IsConfigField

func IsConfigField(f string) bool

IsConfigField check a field whether valid.

Types

type Config

type Config struct {
	Build string `yaml:"build"`
	Test  string `yaml:"test"`
	// same as Pkgs
	Dirs     []string `yaml:"dirs"`
	Pkgs     []string `yaml:"pkgs"`
	Race     *Race    `yaml:"race"`
	Lint     *Lint    `yaml:"lint"`
	Excludes []string `yaml:"excludes"`

	Skips []string `yaml:"skips"`
	// contains filtered or unexported fields
}

Config a ci linter configuration object abstraction.

var (
	// DefaultConfig default config object.
	DefaultConfig *Config
)

func (*Config) InExcludes

func (c *Config) InExcludes(path string) bool

InExcludes check the path whether in excluded directive.

func (*Config) RealPkgs

func (c *Config) RealPkgs() []string

RealPkgs get the realistic packages.

type Lint

type Lint struct {
	IgnoreNoCommentError bool `yaml:"ignore_no_comment_error"`
}

Lint config item for go lint command.

type Race

type Race struct {
	Main    string `yaml:"main"`
	MainCMD string `yaml:"main_cmd"`
	Script  string `yaml:"script"`
	Timeout int    `yaml:"timeout"`
}

Race config item for go race command.

Jump to

Keyboard shortcuts

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