Finalize v0.4.0

This commit is contained in:
Mukhtar Akere
2025-01-24 23:33:08 +01:00
parent 66f4965ec8
commit fc5c6e2869
7 changed files with 224 additions and 63 deletions

View File

@@ -272,3 +272,17 @@ func FileReady(path string) bool {
_, err := os.Stat(path)
return !os.IsNotExist(err) // Returns true if the file exists
}
func Remove[S ~[]E, E comparable](s S, values ...E) S {
result := make(S, 0, len(s))
outer:
for _, item := range s {
for _, v := range values {
if item == v {
continue outer
}
}
result = append(result, item)
}
return result
}