Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/palantir/godel/apps/okgo/config" ) func main() { yml := ` checks: errcheck: args: - "-ignore" - "github.com/seelog:(Info|Warn|Error|Critical)f?" filters: - type: "message" value: "\\w+" ` cfg, err := config.LoadRawConfig(yml, "") if err != nil { panic(err) } if _, err := cfg.ToParams(); err != nil { panic(err) } fmt.Printf("%q", fmt.Sprintf("%+v", cfg)) }
Output: "{Checks:map[errcheck:{Skip:false Args:[-ignore github.com/seelog:(Info|Warn|Error|Critical)f?] Filters:[{Type:message Value:\\w+}]}] Exclude:{Names:[] Paths:[]}}"
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checker ¶
type Checker struct { // Skip specifies whether or not the check should be skipped entirely. Skip bool `yaml:"skip" json:"skip"` // Args specifies the commnand-line arguments provided to the check. Args []string `yaml:"args" json:"args"` // Filters specifies the filter definitions. Raw output lines that match the filter are excluded from // processing. Filters []Filter `yaml:"filters" json:"filters"` }
type OKGo ¶
type OKGo struct { // Checks specifies the configuration used by the checks. The key is the name of the check and the value is the // custom configuration for that check. Checks map[string]Checker `yaml:"checks" json:"checks"` // Exclude specifies the files that should be excluded from tests. Exclude matcher.NamesPathsCfg `yaml:"exclude" json:"exclude"` }
func LoadRawConfig ¶
Click to show internal directories.
Click to hide internal directories.