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

Lesson 12. Functions

After reading lesson 12, you’ll be able to

  • Identify the parts of a function declaration
  • Write reusable functions to build up larger programs

This lesson begins by examining the standard library documentation for functions that were used in earlier lessons.

Once you’re familiar with the syntax for declaring functions, you’ll write functions for a weather station program. The Rover Environmental Monitoring Station (REMS) gathers weather data on the surface of Mars. You’ll write functions that could conceivably be part of a REMS program, such as converting temperatures.

Consider this

Make a sandwich. It sounds ...

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