mapstructure
mapstructure copied to clipboard
Using mapstruct to update one value in the struct at a time
I am trying to use mapstruct to update one of the structs all fields at a time.
Basically, I got a couple of MQTT subscriptions, and when one subscription arrives, I want to update one field in the struct only. But for some reason it is trying to update all fields of my struct.
Is it possible to only point to one field to be updated somehow?
I've made an attempt to convert my enormous 50-case switch to use the mapstruct instead without success. https://github.com/tobiasehlert/teslamateapi/commit/8e6242c1fbb00f065b0202bda8d10464d6551b58
Kind regards, Tobias