© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
R. Hussain, M. ZulfiqarBeginning Go Programminghttps://doi.org/10.1007/978-1-4842-8858-0_3

3. Go Recipes: Programming Fundamentals and Basics

Rumeel Hussain1   and Maryam Zulfiqar2
(1)
Dubai, United Arab Emirates
(2)
Lahore, Pakistan
 

Go is a great language. It’s compact, performant, and has great support for concurrency. This chapter covers common programming tasks and shows recipes for completing them. It covers language basics, date/time types, how to work with text files effectively, how to work with structs, and how to handle concurrency.

Numbers and Slices in Go

Listing 3-1 illustrates a Go recipe for calculating the mean of some numbers. The mean is defined ...

Get Beginning Go Programming: Build Reliable and Efficient Applications 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.