Abstract
When you write programs, the type system of your choice of language is very important. Types allow you to organize your application data in a structured way that can be persisted into various data stores. When you write applications, especially business applications, you organize your application data using various types and persist the values of those types into persistence storage. When you write applications with Go, it is important to understand its type system and its design philosophy. Go provides various built-in types such as int, uint, float64, string, and bool. Data structures for storing collections of values such as arrays, slices, and maps are known as composite types because they are made up of other types—built-in types and user-defined types. In addition to the built-in types provided by Go, you can create your own types by combining with other types. This chapter contains recipes for user-defined types in Go.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Shiju Varghese
About this chapter
Cite this chapter
Varghese, S. (2016). Structs and Interfaces. In: Go Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1188-5_3
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1188-5_3
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1189-2
Online ISBN: 978-1-4842-1188-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books