O'Reilly logo

Get Programming with Go by Nathan Youngman and Roger Peppé

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required