chore: comment fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
// Package data
|
||||||
package data
|
package data
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -8,7 +9,7 @@ import (
|
|||||||
"greenlight.debuggingjon.dev/internal/validator"
|
"greenlight.debuggingjon.dev/internal/validator"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Define a new Metadata struct for holding the pagination metadata.
|
// Metadata struct for holding the pagination metadata.
|
||||||
type Metadata struct {
|
type Metadata struct {
|
||||||
CurrentPage int `json:"current_page,omitempty"`
|
CurrentPage int `json:"current_page,omitempty"`
|
||||||
PageSize int `json:"page_size,omitempty"`
|
PageSize int `json:"page_size,omitempty"`
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ var (
|
|||||||
ErrEditConflict = errors.New("edit conflict")
|
ErrEditConflict = errors.New("edit conflict")
|
||||||
)
|
)
|
||||||
|
|
||||||
// Create a Models struct which wraps the MovieModel. We'll add other models to this,
|
// Models struct which wraps the MovieModel. We'll add other models to this,
|
||||||
// like a UserModel and PermissionModel, as our build progresses.
|
// like a UserModel and PermissionModel, as our build progresses.
|
||||||
type Models struct {
|
type Models struct {
|
||||||
Movies MovieModel
|
Movies MovieModel
|
||||||
@@ -20,7 +20,7 @@ type Models struct {
|
|||||||
Users UserModel
|
Users UserModel
|
||||||
}
|
}
|
||||||
|
|
||||||
// For ease of use, we also add a New()
|
// NewModels For ease of use, we also add a New()
|
||||||
// method which returns a Models struct containing
|
// method which returns a Models struct containing
|
||||||
// the initialized MovieModel.
|
// the initialized MovieModel.
|
||||||
func NewModels(db *sql.DB) Models {
|
func NewModels(db *sql.DB) Models {
|
||||||
|
|||||||
Reference in New Issue
Block a user