(options *Options)
| 60 | } |
| 61 | |
| 62 | func loadExtractorConfigFile(options *Options) (config.Config, error) { |
| 63 | configPath := *options.ConfigPath |
| 64 | fstat, err := os.Stat(configPath) |
| 65 | if err != nil { |
| 66 | return config.Config{}, err |
| 67 | } |
| 68 | |
| 69 | if fstat.IsDir() { |
| 70 | return config.ParseConfig(filepath.Join(configPath, "config.yaml")) |
| 71 | } |
| 72 | return config.ParseConfig(configPath) |
| 73 | } |
| 74 | |
| 75 | func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error { |
| 76 | *c = Config{} |