Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Specifying the endpoints for the frontend application

The following table lists the HTTP request types and endpoints that our frontend service needs to handle in order to implement all the features we described previously:

Request Type Path Description
GET / Displays the index page
GET /search?q=TERM Displays the first page of results for TERM
GET /search?q=TERM&offset=X Displays the results for TERM, starting from a particular offset
GET /submit/site Displays the site submission form
POST /submit/site Handles a site submission
ANY Any other path Displays a 404 page

To make our life easier, we will be using gorilla/mux as our preferred router. Creating the router and registering the endpoint handlers is as simple as using ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content