(config *Config, path string)
| 279 | } |
| 280 | |
| 281 | func getRule(config *Config, path string) (rule string) { |
| 282 | fileName := filepath.Base(path) |
| 283 | for k := range config.Golic.Rules { |
| 284 | matched, _ := filepath.Match(k, fileName) |
| 285 | if matched { |
| 286 | return k |
| 287 | } |
| 288 | } |
| 289 | rule = filepath.Ext(path) |
| 290 | if rule == "" { |
| 291 | rule = filepath.Base(path) |
| 292 | } |
| 293 | return |
| 294 | } |
| 295 | |
| 296 | func (u *Update) readLocalConfig() (*Config, error) { |
| 297 | var c = &Config{} |