© 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_29

29. Using Reflection, Part 3

Adam Freeman1  
(1)
London, UK
 
In this chapter, I complete the description of the Go support for reflection, which I started in Chapter 27 and continued in Chapter 28. In this chapter, I explain how reflection is used for functions, methods, interfaces, and channels. Table 29-1 summarizes the chapter.
Table 29-1

Chapter Summary

Problem

Solution

Listing

Inspect and invoke reflected functions

Use the Type and Value methods for functions

5–7

Create new functions

Use the FuncOf and MakeFunc functions

8, 9

Inspect and invoke reflected methods

Use the Type and Value methods for methods

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.