better hierarchy and better way to make a CRUD

This commit is contained in:
Nicolas Dinquel
2019-06-19 17:17:30 +02:00
parent 55ad7575e6
commit 874fdd0e25
8 changed files with 320 additions and 137 deletions
+8
View File
@@ -0,0 +1,8 @@
package models
import "errors"
var (
// ErrNotFound ...
ErrNotFound = errors.New("requested item is not found")
)
+8
View File
@@ -0,0 +1,8 @@
package models
// Post ...
type Post struct {
ID int `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
}