MCPcopy Create free account
hub / github.com/AbsaOSS/golic / getRule

Function getRule

impl/update/update.go:281–294  ·  view source on GitHub ↗
(config *Config, path string)

Source from the content-addressed store, hash-verified

279}
280
281func 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
296func (u *Update) readLocalConfig() (*Config, error) {
297 var c = &Config{}

Callers 2

injectFunction · 0.85
removeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected