We’re continuing the Buffalo series! Lots of web apps have a login button, and yours probably will too. This time, we’re going to learn how to build one so that your users can login with GitHub.
In this episode I’m coming at you from GopherCon Iceland to talk about commonly used packages for Go!
How do you build a website with Go? For a while, we all just cobbled something together with the standard library, Gorilla Mux, and so on. We had to figure a lot out on our own. Not anymore! Now we have Buffalo!
Tests are a huge part of your codebase and your workflow includes writing lots
of tests (I hope!) We’ll talk about how to up your testing game using
Why should you use more than just the standard
package? Under what circumstances? What are the benefits? All covered here!
There was a request in #125 that I do a screencast on how to consume json with unknown fields.
This screencast shows how to exactly that! I’ll show how to parse JSON using just the standard library, and also point folks to a package that will help if you don’t want to steal my code (which is totally fine by the way!)
We explore the
error interface (https://godoc.org/builtin#error) more closely and explain how and why to create custom error types that you can pass wherever an
error is expected.
We also talk about some best practices in exposing and describing your custom types inside of your libraries and packages.
We finish the concurrency series by showing how to solve the “Internet Cafe” problem on Trivial Concurrency Exercises for the Confused Newbie Gopher. The solution we’ll show has a bug, however, and the extended screencast fixes it.
See https://gum.co/gifm-x-15 for more details.
We show how to do use the the
html/template package (and its close sibling,
text/template). We pay special attention to templating tasks most common to web development like layouts, blocks and partials.
We describe the problem #2 on Trivial Concurrency Exercises for the Confused Newbie Gopher and then present and detail a solution to the problem.
We show how to structure and build a complete JSON API in a Go server. This screencast explains basic structuring patterns and concepts and includes code for a complete, working server that simulates a management system for a platform-as-a-service (PaaS).
We describe the problem #1 on Trivial Concurrency Exercises for the Confused Newbie Gopher and then present and detail a solution to the problem.
We explain what
go get does, and why is isn’t sufficient for dependency management. We also explain what a reproducible build is in Go and why it’s so important, and explain why vendoring achieves reproducible builds. We then introduce Glide and show how we’d vendor the code from episode 6 using the tool.
The example and sample code shows a complete browser-based chat application.
This screencast expands on concepts in episode 1, but you don’t need to watch that screencast to understand this one.
Welcome to the first Go In 5 Minutes screencast!
We show how to write code that is extensible and testable and then how to write fast, correct unit tests against it.