(plugin string)
| 350 | } |
| 351 | |
| 352 | func readPluginConfig(plugin string) (conf []string, err error) { |
| 353 | data, err := os.ReadFile(plugin[:len(plugin)-3] + ".conf") |
| 354 | if err != nil { |
| 355 | if os.IsNotExist(err) { |
| 356 | return nil, nil |
| 357 | } |
| 358 | return nil, err |
| 359 | } |
| 360 | for line := range strings.SplitSeq(string(data), "\n") { |
| 361 | line = strings.TrimSpace(line) |
| 362 | if line != "" && line[0] != '#' { |
| 363 | conf = append(conf, line) |
| 364 | } |
| 365 | } |
| 366 | return conf, nil |
| 367 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…