Skip to main content
1 of 2

You can use the UnpackIntoInterface which takes three parameters

event := struct {
    Key   [32]byte
    Value [32]byte
}{}
_ = contractAbi.UnpackIntoInterface(&event, "ItemSet", vLog.Data)
fmt.Println(string(event.Key[:]))   // foo
fmt.Println(string(event.Value[:])) // bar