|
|
|
|
|
by NateDad
4431 days ago
|
|
Many gophers hate magic. ORMs are specifically magic, and therefore not very popular with many gophers. Many gophers have a lot of experience in other languages with ORMs and have been burned by them on many occasions. I like to say - ORMs make the easy stuff easier, and the hard stuff harder. If you're only doing really simple object storage and your data model easily fits with the model the ORM expects, then it's not too bad. If you EVER want to deviate from that model (and you'll ALWAYS end up wanting to deviate from that model), then you are gonna have a bad time. There actually are plenty of Go ORMs: https://code.google.com/p/go-wiki/wiki/Projects#ORM (there's probably many that aren't on this list) Many gophers prefer their code to be more obvious and more under their control. Writing a little SQL never hurt anyone, and Go's SQL package is pretty good. Personally, I like http://github.com/jmoiron/sqlx - you have to write SQL statements still (I consider that a good thing), but it removes the boilerplate of getting data in and out of structs. |
|