Adding concurrency control in our updateMovieHandler and documenting it.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 57s

This commit is contained in:
Maxime Delporte
2025-11-08 10:41:44 +01:00
parent b76496e096
commit f8f78c3eec
5 changed files with 36 additions and 4 deletions

View File

@@ -6,8 +6,10 @@ import (
)
// ErrRecordNotFound : Define a custom ErrRecordNotFound error. We'll return this from our Get() method when looking up a movie that doesn't exist in our database.
// ErrEditConflict : This error is used when a data race occurs.
var (
ErrRecordNotFound = errors.New("record not found")
ErrEditConflict = errors.New("edit conflict")
)
// Models : Wraps the MovieModel. We'll add other models to this, like a UserModel and PermissionModel, as our build progresses.