stripPluginName is a helper that relies on some sort of convention for plugin name (plugin-name- )
(name string)
| 183 | |
| 184 | // stripPluginName is a helper that relies on some sort of convention for plugin name (plugin-name-<version>) |
| 185 | func stripPluginName(name string) string { |
| 186 | var strippedName string |
| 187 | for suffix := range Extractors { |
| 188 | if before, ok := strings.CutSuffix(name, suffix); ok { |
| 189 | strippedName = before |
| 190 | break |
| 191 | } |
| 192 | } |
| 193 | re := regexp.MustCompile(`(.*)-[0-9]+\..*`) |
| 194 | return re.ReplaceAllString(strippedName, `$1`) |
| 195 | } |
no outgoing calls
searching dependent graphs…