I was a NodeJS / PHP developer and I'm a beginner using Go. After doing a little research, I come up with a MVC style folder structure like this for my REST API project.
.
+- bin/
+- controllers/
+- userController/
+- userController.go
+- models/
+- userModel/
+- userModel.go
+- main.go
Thus, I can have my code look like this:
import "github.com/gin-gonic/gin"
import "controllers/userController"
router := gin.Default()
router.GET("/user", userController.handleSomeLogicHere)
However, I then realised that it is not recommended to use camel case and snack case for packages according to the GoLang official website.
I am wondering if it is not a good practice to use MVC in Go (because I know some one suggest module/dependency based folder structure)?
Or should I change all controllers and models into one word like usercontroller or userctrl (but it seems like a bit wired to me)?