feat: go-chi and first routes setup

This commit is contained in:
Florian Sylvain
2023-08-06 05:00:15 +02:00
parent 5b4b5a8622
commit 195c247235
9 changed files with 189 additions and 38 deletions
+7 -7
View File
@@ -1,11 +1,11 @@
package article
type Article struct {
Id int
Title string
Body string
createdAt string
updatedAt string
Id int `json:"id"`
Title string `json:"title"`
Body string `json:"body"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
func FromApi(
@@ -29,7 +29,7 @@ func FromDb(
Id: id,
Title: title,
Body: body,
createdAt: createdAt,
updatedAt: updatedAt,
CreatedAt: createdAt,
UpdatedAt: updatedAt,
}
}