Documentation
¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/palantir/godel/apps/gonform/config" ) func main() { yml := ` formatters: gofmt: args: - "-s" ` cfg, err := config.LoadRawConfig(yml, "") if err != nil { panic(err) } fmt.Printf("%q", fmt.Sprintf("%+v", cfg)) }
Output: "{Formatters:map[gofmt:{Args:[-s]}] Exclude:{Names:[] Paths:[]}}"
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Formatter ¶
type Formatter struct { // Args specifies the command-line arguments that are provided to the formatter. Args []string `yaml:"args" json:"args"` }
type Gonform ¶
type Gonform struct { // Formatters specifies the configuration used by the formatters. The key is the name of the formatter and the // value is the custom configuration for that formatter. Formatters map[string]Formatter `yaml:"formatters" json:"formatters"` // Exclude specifies the files that should be excluded from formatting. Exclude matcher.NamesPathsCfg `yaml:"exclude" json:"exclude"` }
func LoadRawConfig ¶
func (*Gonform) ToParams ¶
func (r *Gonform) ToParams() params.Formatters
Click to show internal directories.
Click to hide internal directories.