10 The standard library
This chapter covers
- Command-line tool-creation basics
- Discovering libraries within the standard library
- Using the standard library for common use cases
Programming languages provide us with a basic syntax and grammar to use when writing our applications. Each language uses different primitives and patterns that make the language unique, much like our own languages. We have words, ways to pronounce them, and ways to string them together into a standard grammar, and we compile them into pages, books, and libraries. With programming languages, we end up making our own types of libraries, or collections of commonly used code, that speed up development.
When Go is installed, it includes its own library, known simply as the standard library, as opposed to community libraries, which are installed afterward. We have already used some standard library functions and structures in our small programs. In fact, it is fairly difficult to write anything without a standard library. The fact that so much can be done with the standard library makes Go a great language for modern application development.