diff --git a/19-structs/01-basics/.README.md b/19-structs/01-basics/.README.md index d5509e7..b3d8c7c 100644 --- a/19-structs/01-basics/.README.md +++ b/19-structs/01-basics/.README.md @@ -22,8 +22,7 @@ In this exercise, you'll build a game store along with a set of functions to que | {{index . "list" 1 "id"}} | {{index . "list" 1 "name"}} | {{index . "list" 1 "price"}} | {{index . "list" 1 "genre"}} | | {{index . "list" 2 "id"}} | {{index . "list" 2 "name"}} | {{index . "list" 2 "price"}} | {{index . "list" 2 "genre"}} | -5. Write a `queryById` function that returns the game in a gamelist with the given id or an "No - such game" error. +5. Write a `queryById` function that returns the game in a gamelist with the given id or an "no such game" error. 6. Write a `listNameByPrice` function that returns the name of the game(s) with price equal or smaller than a given price. diff --git a/19-structs/01-basics/.exercise_test.go b/19-structs/01-basics/.exercise_test.go index e27ce08..23e48ef 100644 --- a/19-structs/01-basics/.exercise_test.go +++ b/19-structs/01-basics/.exercise_test.go @@ -52,7 +52,7 @@ func TestById(t *testing.T) { assert.Equal(t, "{{index . "by_id" "result" "genre"}}", g.genre, "game genre") g, err = queryById(newGameList(), 11) - assert.EqualError(t, err, "No such game", "error") + assert.EqualError(t, err, "no such game", "error") } func TestNameByPrice(t *testing.T) { diff --git a/19-structs/01-basics/exercise.go b/19-structs/01-basics/exercise.go index 3b2c92e..08abf28 100644 --- a/19-structs/01-basics/exercise.go +++ b/19-structs/01-basics/exercise.go @@ -25,7 +25,7 @@ func newGameList() []game { // INSERT YOUR CODE HERE } -// queryById returns the game in the specified store with the given id or returns a "No such game" error. +// queryById returns the game in the specified store with the given id or returns a "no such game" error. func queryById(games []game, id int) (game, error) { // INSERT YOUR CODE HERE }