From the course: Learning the Go Standard Library

Overview of Go packages - Go Tutorial

From the course: Learning the Go Standard Library

Start my 1-month free trial

Overview of Go packages

- [Instructor] When you install the Go programming environment, you're getting a lot more than just a high performance language. Go comes with an extensive set of prebuilt modules, called packages, which provide support for a wide variety of programming scenarios. You can find the documentation for the Go standard package library at this link, which I have open in my browser. And if we take just a quick look through the page, we can see that there's quite a few packages here that cover a lot of different areas. We've got packages for working with TAR and ZIP archives. We've got some packages for cryptography work. Here we've got some packages for encoding information. If we keep going, we'll see we've got packages for working with HTML and images. We've got some math and networking related packages and a lot more. Now, given the size of this library, it's pretty clear that we won't be able to cover all of this content in a single course. So what I'm going to do in this course is review a selection of some of the most common packages to give you a starting point to understand what you can do with Go and then you can explore the rest of the library on your own. So, let's take a look at some of the packages that we're going to be examining in this course. We're going to start off with the formatting package named FMT, which contains functions for formatting string content, and printing information to the console, and reading input, and so on. And we're going to be using this package quite a bit throughout the course. So it makes sense to learn how to use that first. Then we're going to learn about the strings package along with a couple of related packages, called strconv and unicode. And these packages are really helpful for working with string and text content. And then we'll take a look at some of the math and random packages for working with mathematical operations and random numbers. Next, we'll take a look at how to work with files and directories. And for these, we're going to need packages, like OS and ioutil, and then we'll finish up with packages for common networking applications, like URLs, performing HTTP operations, and processing JSON and XML content. And again, this is just a sampling of the Go standard library, but once you have a feel for the basics, you should be able to pick up the other packages as you need them.

Contents