Arrays in Go are useful when planning for detailed layout of memory. Using arrays can sometimes help avoid allocation. However, their primary use is for the building blocks of slices.
This chapter will cover the basics of creating, initializing, and indexing an array. It will also cover basic loop constructs and loop control basics.
Slices wrap arrays in Go, and provide a more general, powerful, and convenient interface to data sequences. In this chapter, you will cover slice basics such as creating, initializing, and iteration. You will also learn how to grow a slice, work with subsets of slices, and slice tricks.
A pointer is a type that holds the address that points to a variables value. In many languages, pointers are the source of pain and confusion. Go has made it easy to use and understand pointers. In this module you will learn about the difference between pass by value and pass by reference. You wi...
1 Comment