In this chapter, I begin to describe the Go language, focusing on the basic data types before moving on to how they are used to create constants and variables. I also introduce the Go support for pointers. Pointers can be a source of confusion, especially if you are coming to Go from languages such as Java or C#, and I describe how Go pointers work, demonstrate why they can be useful, and explain why they are not to be feared.
4. Basic Types, Values, and Pointers
Get Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang 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.