Closed yojkim closed 5 years ago
Hi @yojkim,
Nothing particular reasons, there are no rules about it. It's just how I importing packages here. But if you have a better idea, I'll listen to it :)
Yes, you can do that. So, you will import the user
model in the auth
package, right? Nothing wrong with that, that's why I separate all models into one package, so every module can import it without having problems with something like circular import, or redundant code.
Thank you @bxcodec !
First of all, Thank you for your awesome idea 👍
In
main.go
, Is there any reason to name like this? I can't understand the detail feature of this convention with an underscore in front of the package name such as_articleRepo
Could I allow to add the package unrelated with models? (indirectly related?) Like below tree, I just define
user.go
inmodel
and implement authentication feature inauth
package. I wanted to separateauth
package fromuser
. Actually, I'm not sure with this Idea.Thank you.