When releasing, allow certain replacements.

This commit is contained in:
monopole
2021-04-30 17:08:16 -07:00
parent 7716b1bd3d
commit b6fba0ad5c
4 changed files with 54 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package utils
import (
"log"
"os"
"strings"
)
func DirExists(name string) bool {
@@ -24,3 +25,20 @@ func SliceToSet(slice []string) map[string]bool {
}
return result
}
func ExtractModule(m string) string {
k := strings.Index(m, " => ")
if k < 0 {
return m
}
return m[:k]
}
func SliceContains(slice []string, target string) bool {
for _, x := range slice {
if x == target {
return true
}
}
return false
}