better hierarchy and better way to make a CRUD
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package models
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
// ErrNotFound ...
|
||||
ErrNotFound = errors.New("requested item is not found")
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package models
|
||||
|
||||
// Post ...
|
||||
type Post struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
Reference in New Issue
Block a user