Go Recipes pp 103-127 | Cite as

Using Standard Library Packages

  • Shiju Varghese


Packages are a very important component in the Go ecosystem. Go code is organized as packages that enable reusability and composability to your Go programs. The Go installation comes with a lot of reusable packages called standard library packages. These packages extend the Go language and provide reusable libraries for building a variety of applications. They can help you quickly build applications because you don’t need to write your own packages for many common functionalities. If you want to extend the standard library packages, you can either create your own or obtain third-party packages provided by the Go developer community. The standard library packages are very rich in functionality. You can build full-fledged web applications using only standard library packages, without using any third-party packages. This chapter’s recipes cover how to use standard library packages for some common functionalities such as encoding and decoding JavaScript Object Notation (JSON) objects, parsing command-line flags, logging Go programs, and archiving files. The documentation of standard library packages is available from


File Content Archive File Employee Struct Common Functionality Package Flag 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Shiju Varghese 2016

Authors and Affiliations

  • Shiju Varghese
    • 1
  1. 1.Chettiyadan HouseCheranalloorIndia

Personalised recommendations