Unit 3. Building blocks

Programming is the breaking of one big impossible task into several very small possible tasks.

Jazzwant

Functions are the building blocks of computer programs. You can call on functions like Printf to format and display values. The pixels that end up on your screen are delivered by layers of functions in Go and your operating system.

You can write functions too. Functions help you organize your code, reuse functionality, and think about a problem in smaller pieces.

Not only that, by learning how to declare functions and methods in Go, you’ll be equipped to explore the rich functionality provided by the standard library and documented at golang.org/pkg.

Get Get Programming with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.