Changing Structure Values Using Reflection

Let’s learn how to change values using reflection in the Go structure.

Learning about the internal structure of a Go structure is handy, but what is more practical is being able to change values in the Go structure, which is the subject of this lesson.

Coding example

Let’s look at the setValues.go code:

Get hands-on with 1200+ tech skills courses.