Add unused utility function
This commit is contained in:
9
util.go
9
util.go
@@ -38,7 +38,12 @@ func ReadEnvFile(path string) (map[string]string, error) {
|
|||||||
return output, nil
|
return output, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a new chat session id and saves it to a file
|
func Contains[T comparable](haystack []T, needle T) bool {
|
||||||
func NewChat(path string) {
|
for _, v := range haystack {
|
||||||
|
if v == needle {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user