bugfix: All previous entity files are removed when file is updated

This commit is contained in:
jamesread
2024-02-25 00:01:51 +00:00
parent f3934b1906
commit 0ec2e7069b
2 changed files with 10 additions and 0 deletions

View File

@@ -27,3 +27,11 @@ func ReplaceEntityVars(prefix string, source string) string {
return source
}
func RemoveKeysThatStartWith(search string) {
for k, _ := range Contents {
if strings.HasPrefix(k, search) {
delete(Contents, k)
}
}
}