© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro Gohttps://doi.org/10.1007/978-1-4842-7355-5_28

28. Using Reflection, Part 2

Adam Freeman1  
(1)
London, UK
 
In addition to the basic features described in the previous chapter, the reflect package provides additional features that are useful when working with a specific kind of type, such as maps or structs. In the sections that follow, I describe these features and demonstrate their use. Some of the methods and functions described are used with more than one type, and I have listed them several times for quick reference. Table 28-1 summarizes the chapter.
Table 28-1

Chapter Summary

Problem

Solution

Listing

Create or follow a pointer type

Use the PtrTo ...

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.