-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## This is the example web server from lesson two in Golang intro. | ||
|
||
[Golang intro](https://github.com/fheng/golang-intro/blob/master/chapter-two.md) | ||
|
||
## Homework | ||
|
||
- Add a new route to the api | ||
``` | ||
/api/time | ||
``` | ||
That returns a json structure that looks like : | ||
|
||
```json | ||
|
||
{"time":1473438486} | ||
|
||
``` | ||
- Add a new test that calls the new api | ||
|
||
|
||
## Hints | ||
|
||
- Start with the router and look at the echo handler | ||
- you will need a new type that matches has a time property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters