Add unused utility function

This commit is contained in:
Ole Morud
2023-05-26 23:40:01 +02:00
parent c3f05ced14
commit 79793a8951

View File

@@ -38,7 +38,12 @@ func ReadEnvFile(path string) (map[string]string, error) {
return output, nil
}
// Creates a new chat session id and saves it to a file
func NewChat(path string) {
func Contains[T comparable](haystack []T, needle T) bool {
for _, v := range haystack {
if v == needle {
return true
}
}
return false
}