This commit is contained in:
Vladislav Kunetskiy
2026-10-15 20:45:29 +03:00
parent 1fdaf6299a
commit f4bd361f12
140 changed files with 12784 additions and 2198 deletions
+21
View File
@@ -0,0 +1,21 @@
package postgres
import "time"
func toUTCTime(t time.Time) time.Time {
if t.Location() == time.UTC {
return t
}
return t.UTC()
}
func mapAll[S, D any](rows []S, mapRow func(S) D) []D {
mapped := make([]D, 0, len(rows))
for _, row := range rows {
mapped = append(mapped, mapRow(row))
}
return mapped
}