Use Runtime type instead of int32 in our Movie struct.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s
This commit is contained in:
@@ -14,10 +14,7 @@ type Runtime int32
|
||||
|
||||
// MarshalJSON
|
||||
/*
|
||||
Implement a MarshalJSON() method on the Runtime type so that it satisfies
|
||||
the json.Marshaler interface. This should return the JSON-encoded value
|
||||
for the movie runtime (in our case, it will return string in the format
|
||||
"<runtime> mins").
|
||||
Implement a MarshalJSON() method on the Runtime type so that it satisfies the json.Marshaler interface. This should return the JSON-encoded value for the movie runtime (in our case, it will return string in the format "<runtime> mins").
|
||||
*/
|
||||
func (r Runtime) MarshalJSON() ([]byte, error) {
|
||||
// Generate a string containing the movie runtime in the required format.
|
||||
|
||||
Reference in New Issue
Block a user