Skip to Main Content
The Go Workshop
book

The Go Workshop

by Delio D'Anna, Andrew Hayes, Sam Hennessy, Jeremy Leasor, Gobin Sougrakpam, Dániel Szabó, Philipp Mieden, David Parker, Gwenn Etourneau, Arpit Aggarwal, Eugene Wang
December 2019
Beginner content levelBeginner
824 pages
14h 36m
English
Packt Publishing
Content preview from The Go Workshop

4. Complex Types

Overview

This chapter introduces Go's more complex types. This will build on what we learned in the previous chapter regarding Go's core types. These complex types are indispensable when you build more complex software as they allow you to logically group related data together. This ability to group data makes your code easier to understand, maintain, and fix.

By the end of this chapter, you will be able to use arrays, slices, and maps to group data together. You will learn to create custom types based on the core types. You will also learn to use structs to create structures composed of named fields of any other types and explain the importance of interface{}.

Introduction

In the previous chapter, we covered Go's core ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Writing, Presenting, and Communicating with Confidence

Writing, Presenting, and Communicating with Confidence

Harvard Business Review
Become a Better Problem Solver by Telling Better Stories

Become a Better Problem Solver by Telling Better Stories

Arnaud Chevallier, Albrecht Enders, Jean-Louis Barsoux

Publisher Resources

ISBN: 9781838647940Supplemental Content