Jump to ratings and reviews
Rate this book

Mastering Go Web Services

Rate this book
Program and deploy fast, scalable web services and create high-performance RESTful APIs using GoAbout This BookEffectively deploy and integrate Go web services with applications in the real worldFamiliarize yourself with RESTful practices and apply them in GoA comprehensive tutorial with lots of tips and tricks to program and develop web services in GoWho This Book Is ForIf you are a web programmer with experience in developing web services and have a rudimentary knowledge of using Go, then this is the book for you. Basic knowledge of Go as well as knowledge of relational databases and non-relational NoSQL datastores is assumed. Some basic concurrency knowledge is also required.

What You Will LearnFamiliarize yourself with RESTful practices and apply them in GoAcquaint yourself with the best practices for API design such as URL routing and HTTP response methodsUtilize useful middleware and frameworks to augment applications otherwise relying on pure GoUnderstand the basic and complex authentication models for APIsDeploy your code to staging and development environmentsLook at ways to make your Go web services as speedy and thrifty as possibleSecure your web servicesIngest your own API and make it appealing to other developersIn DetailThis book will take you through the most important aspects of designing, building, and deploying a web service utilizing idiomatic REST practices with a focus on speed, security, and flexibility. You will begin by building your first API in Go using the HTTP package. You will look at designing and building your application including popular design structures like Model-View-Controller. You will also understand methods for deploying code to staging and development. Finally, you will see how the security features in Go can be used for protection against SQL injection, and sensitive data compromise.

By the end of this book, you will have achieved a high level of proficiency in building and deploying web services and web APIs with Go.

266 pages, Kindle Edition

First published April 14, 2015

6 people are currently reading
8 people want to read

About the author

Nathan Kozyra

6 books5 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (7%)
4 stars
3 (21%)
3 stars
2 (14%)
2 stars
4 (28%)
1 star
4 (28%)
Displaying 1 - 4 of 4 reviews
Profile Image for Matthew.
22 reviews3 followers
January 1, 2016
Like other Packt Pub books I've read, Mastering Go Web Services could benefit from more editing. The examples are hard to follow as compared to a Manning or O'Reilly book, which tend to clearly identify what code belongs in which file. Additionally, the code in the book doesn't appear to match the provided source code. As an example, the code in the
func Init()
on page 152 of the book differs from the source code:

- Book on p. 152:
for _, domain := range PermittedDomains {

- Source Code:
for _, domain := range allowedDomains {


Another example of additionally editing being needed is in the summary of chapter 8.

In the next chapter we'll dive in deeper with API planning and design, the nitty- gritty of RESTful services, and look at how we can separate our logic from our output. We'll briefly touch on some logic/view separation concepts and move toward more robust endpoints and methods in Chapter 3, Routing and Bootstrapping.


The next chapter—chapter 9—is about deployment not routing and bootstrapping.
Profile Image for Pratik Luitel.
18 reviews11 followers
April 7, 2022
0.5 stars.
Shockingly bad.
Most things here are horribly outdated as of 2022 (doesn't look like the book has gone through any revision at all), the directions given are lackluster at best, many topics are left half explained, the SQL written is vulnerable to injection, I don't think a single line of code written went through proper review. The entire book is littered with bad practice.
I don't regret buying many books - I definitely regretted getting this one. Don't buy this.
379 reviews10 followers
November 1, 2015
Confusionario, scritto male, incompleto: i tre aggettivi che lo descrivono meglio.

Alcune parti sembrano scritte da un'altra persona (o anni prima). L'impressione è che nemmeno l'autore abbia ben chiaro cosa sta spiegando, e che a volte si arrampichi sugli specchi.

Alcune descrizioni sono senza senso. Una per tutte:

Anytime you see data within the grave accent (`) characters, this represents a rune. Altough a string is represented in double quotes and a char in single, the accent represents Unicode data that should remain constant. Technically, this content is held in a int32 value.

Mi piacerebbe conoscere l'algoritmo di compressione che salva `json:"name"` in soli 32bit...
Ma il bello è che la "spiegazione" (tra virgolette, perché non lo spiega affatto) di cosa siano quelle parti tra accenti gravi, la dà dopo averli usati per 4 capitoli.

Tralasciando poi le SQL-injection ("parleremo di sicurezza nell'ultimo capitolo"...), i bug nel codice, i nomi delle variabili che a volte sono diversi tra codice e testo, il "dimenticarsi" in quale file vada scritto un pezzo di codice, e mille altre sviste.

Eccezionale l'articolo sul deploy che non dice quasi niente, ma che spiega la struttura del progetto (che avrebbe dovuto essere al capitolo 1), e quello che spiega AMQP in 4 pagine.
Profile Image for Roustem.
17 reviews22 followers
May 3, 2015
Useful

Good and practical overview of building web apps in Go. I found a few chapters I could apply right away.
Displaying 1 - 4 of 4 reviews

Can't find what you're looking for?

Get help and learn more about the design.