Book Image

Go Standard Library Solutions [Video]

By : Johnny Boursiquot
Book Image

Go Standard Library Solutions [Video]

By: Johnny Boursiquot

Overview of this book

Go comes out of the box with a full-featured standard library, requiring little in the way of third-party libraries for things like string manipulation, file and network I/O, testing, HTTP servers, and so much more. In this course, we will dive into the packages that are the most commonly used within the standard library, including fmt, strings, strconv, errors, flag, regexp, io, os, bytes, math, time, archive, compress and image. We will also cover the net/http and context packages packages to build resilient networked applications like HTTP servers and clients. We’ll learn how to take in and serve up JSON for our REST APIs using the encoding/json package. Testing is a first class citizen in Go and we’ll learn how to take full advantage of it using the testing package. Lastly, no Go course would be complete without getting into what draws many to Go in the first place, it’s concurrency primitives and patterns.
Table of Contents (6 chapters)
Chapter 2
Build Tools, I/O, and Error Handling
Content Locked
Section 2
Interact with the Environment through the flag and os Packages
In this video, we will learn to use the flag and os packages. - Learn what the flag package offers - How to read environment variables - Build CLI apps with the flag and os packages