Module 09 of 12

Standard Library & I/O

Lessons

About This Module

One of Go's biggest strengths is its standard library. Much of what you need to build real programs, from reading files to encoding JSON to working with dates, is included, so you can often avoid third-party dependencies entirely.

This module starts with file I/O, reading and writing files with the os and io packages. It then covers io.Reader and io.Writer, the small interfaces that much of the library is built around, followed by JSON encoding and decoding and working with dates and times.

Watch the lessons in order and try each package on a small task of your own, then continue on to Web APIs & Databases.

Lessons

4 videos
01

Go File I/O Tutorial: Read & Write Files with os and io Packages

Reading and writing files in Go using the os and io packages.

02

Understanding io.Reader & io.Writer in Go with Code Examples

The io.Reader and io.Writer interfaces, and why so much of the Go standard library is built on them.

03

Go JSON Tutorial: Marshalling and Unmarshalling Explained

Converting Go values to JSON and back again with marshalling and unmarshalling.

04

Go Makes Dates and Times Easy

Working with dates and times using the time package from the standard library.