Learning the Go Standard Library
3h 18mBeginner2021-03-03
Authors

Joe Marini
Senior Developer Advocate at Google, Developer
Course details
In the world of programming languages, Go is a relative newcomer, but has become very popular in the developer community due to its simplicity, performance, and focus on modern programming techniques like concurrency. The key to making the most efficient use of Go is to keep your code lean, and one of the best ways to do that is to use the standard package library. As instructor Joe Marini explains, a big part of the popularity of Go is due to the large and growing ecosystem of packages that make up that standard library. In this course, Joe takes a look at several of the more popular and useful packages that address common development scenarios, like formatting strings for output and display to the user, performing common networking tasks like HTTP requests, processing internet data formats like XML and JSON, and working with files and directories. After this course, you’ll have a solid grasp of what's included in the standard library and how to leverage it within your code.
Skills covered
GoGoogleLearningProgramming LanguagesSoftware Development
Concepts
Introduction
- Don t go re-inventing the wheel
- What you should know
- Setting up the environment
- Overview of Go packages
Formatting with Fmt
- Overview of the fmt package
- Print and Println basics
- Using Printf and Sprintf
- Formatting and precision
- Reading from standard input
Working with Strings
- The strings package
- Basic string operations
- String searching
- String manipulation
- Using the Map function
- Using string builder
- Parsing strings with strconv
- String tests with Unicode
Mathematical Operations
- The math package basics
- Trigonometry and other functions
- Random number generation
- Using random numbers
Files and Directories
- File information
- Writing files
- Reading files
- Directory operations
- Temporary files and directories
Networking
- Working with URLs
- Performing HTTP GET
- Performing HTTP POST
- Encoding JSON
- Decoding JSON
- Encoding XML
- Decoding XML
Conclusion
- Next steps