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

Building RESTful APIs in Go

Nowadays, building RESTful APIs in Go is a fairly streamlined process. If you don't mind a little bit of elbow grease (for example, using regular expressions to manually extract parameters from request paths), you can build your very own HTTP router by leveraging the functionality offered by http.Mux, a component that ships with the Go standard library.

While building your own router from scratch would undoubtedly be a great learning experience, you should probably save quite a bit of time (and effort) and simply use one of the popular, battle-tested router packages such as gorilla-mux [5] or HttpRouter [3].

On the other hand, if fully-fledged web frameworks (combining a router, middleware, and perhaps an ORM into ...

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