Fixing typo.
This commit is contained in:
@@ -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
|
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
|
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
|
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
|
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.
|
an integer and return it. If the operation isn't successful, return 0 and an error.
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import "time"
|
|||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
/*
|
/*
|
||||||
Annotate the Movie struct with struct tags to control how the keys
|
Annotate the Movie struct with struct tags to control how the keys
|
||||||
appear in the JSON-encoded output.
|
appear in the JSON-encoded output.
|
||||||
*/
|
*/
|
||||||
type Movie struct {
|
type Movie struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
|
|||||||
Reference in New Issue
Block a user