You've successfully subscribed to Go Beyond
Great! Next, complete checkout for full access to Go Beyond
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

Go Walkthrough

Go Walkthrough: fmt

In the last post we looked at fast, primitive encoding using strconv [https://golang.org/pkg/strconv/] but in this post we’ll take a higher level approach by using templates with the fmt [https://golang.org/pkg/fmt/] package. The fmt [https://golang.org/pkg/fmt/] package builds on

Ben Johnson
Ben Johnson
Go Walkthrough

Go Walkthrough: strconv

Formatting & parsing primitive values in Go is a common task. You probably first dipped your toes into the fmt [https://golang.org/pkg/fmt/] package when you started Go, however, there’s a less commonly used package for basic formatting that’s more efficient and preserves compiler type checking.

Ben Johnson
Ben Johnson
Go Walkthrough

Go Walkthrough: encoding/binary

When you need to squeeze every last bit or CPU cycle out of your protocol, one of the best tools is the encoding/binary [https://golang.org/pkg/encoding/binary/] package. It operates on the lowest level and is built for working with binary protocols. We previously looked at using

Ben Johnson
Ben Johnson
Go Walkthrough

Go Walkthrough: encoding/json

For better or for worse, JSON is the encoding of the Internet. Its formal definition is small enough that you could write it on the back of a napkin but yet it can encode strings, numbers, booleans, nulls, maps, and arrays. Because of this simplicity, every language has a JSON

Ben Johnson
Ben Johnson
Go Walkthrough

Go Walkthrough: encoding

So far we’ve covered working with raw byte streams and bounded byte slices but few applications simply shuttle bytes around. Bytes alone don’t convey much meaning, however, once we encode data structures on top of those bytes then we can build truly useful applications. This post is part

Ben Johnson
Ben Johnson
Go Walkthrough

Go Walkthrough: bytes + strings

In the previous post we covered byte streams but sometimes we need to work with bounded, in-memory byte slices instead. While working with a list of bytes seems simple enough, there are a lot of edge cases and common operations that make using the bytes [https://golang.org/pkg/bytes/

Ben Johnson
Ben Johnson
Go Walkthrough

Go Walkthrough: io

Go is a programming language built for working with bytes. Whether you have lists of bytes, streams of bytes, or individual bytes, Go makes it easy to process. From these simple primitives we build our abstractions and services. The io package is one of the most fundamental packages within the

Ben Johnson
Ben Johnson
Go Walkthrough