From 5ca50c656618e9ff873723bca8c01b6ce2c4e148 Mon Sep 17 00:00:00 2001 From: Maxime Delporte Date: Sun, 19 Oct 2025 18:08:58 +0200 Subject: [PATCH] Fixing typo. --- cmd/api/helpers.go | 2 +- internal/data/movies.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/api/helpers.go b/cmd/api/helpers.go index ad7c5ae..2b4356f 100644 --- a/cmd/api/helpers.go +++ b/cmd/api/helpers.go @@ -14,7 +14,7 @@ application struct so it could just be a regular function, rather than a method application. But in general, I suggest setting up all your application-specific handlers and helpers so that they are methods on application. It helps maintain consistency in your code structure, and also future-proofs your code for when those handlers and -helpers change later and they do need access to dependency. +helpers change later, and they do need access to dependency. Retrieve the "id" URL parameter from the current request context, then convert it to an integer and return it. If the operation isn't successful, return 0 and an error. diff --git a/internal/data/movies.go b/internal/data/movies.go index 82b56a6..dff76af 100644 --- a/internal/data/movies.go +++ b/internal/data/movies.go @@ -4,8 +4,8 @@ import "time" // Movie /* -Annotate the Movie struct with struct tags to control how the keys -appear in the JSON-encoded output. + Annotate the Movie struct with struct tags to control how the keys + appear in the JSON-encoded output. */ type Movie struct { ID int64 `json:"id"`