V
V
v- death2015-08-15 21:46:13
go
v- death, 2015-08-15 21:46:13

How to properly implement models in the mvc pattern?

Hello. I registered the routes directly in main.go, I imported a package with all the controllers into it (I don’t see the point in dividing it into a bunch of packages) I also kind of figured out the views. Now I can't figure out how to implement the models. After all, each model must be written in its own file. Of course, I can import a package for each model, but in my opinion this is hellish shit code. How to implement correctly? thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2015-08-15
@index0h

https://github.com/jinzhu/gorm is it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question