I have a struct like this one:
type ProductionInfo struct {
StructA []Entry
}
type Entry struct {
Field1 string
Field2 int
}
I would like to change the value of Field1
using reflection but the reflect object returned always CanSet() = false
. What can I do? See playground example.
Aucun commentaire:
Enregistrer un commentaire