#gorm — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #gorm, aggregated by home.social.
-
A question for the #Golang crowd! I'm building an API for configuring e-mail hosting. I want a simple #REST #API, and I'd like to build a #kubectl like command line client too. Backend will probably be #GORM and #PostgreSQL with a lot of different entities. What would you recommend for keeping the server and client models in sync? I'm thinking some sort of code generation, but I'm unsure about the direction to go in - #OAPI #Codegen or #Swaggo? Annotations in code or a definition in Yaml? Perhaps with the generated models in a separate module for easy sharing between #client and #server? How do the clever people do it? :-)
-
Психанул на неудобный драйвер pgx и написал свою библиотеку. Все как по канонам гошников ) — Golang
После месяцев рутинного сканирования строк в структуры я решил: "Хватит это терпеть!" и психанув, создал обертку, которая: ✔ Автоматизирует скан — никаких rows.Scan(), просто передаете структуру ✔ Работает с любыми вложенностями — даже сложные JSON-поля парсятся без боли ✔ Не тормозит — минимальные накладные расходы, вся мощь pgx сохраняется ✔ Подходит для любого проекта — можно внедрять постепенно 👉 Это не просто библиотека — это мой ответ на боль всех gopher'ов!
https://habr.com/ru/articles/931248/
#go #golang #orm #postgres #postgresql #pgx #gorm #opensource #software #sql
-
pgxWrappy — потому что жизнь слишком коротка для ручного сканирования в Go! �
Если вы устали от бесконечного rows.Scan(), ручного разбора вложенных структур и километрового boilerplate-кода — pgxWrappy создан для вас! 🚀 Делаем неудобное удобным! Жить с удобством
https://habr.com/ru/articles/931242/
#Go #golang #pgx #sql #gorm #orm #postgres #pgsql #database #opensource