use pointer for configchanges struct
This commit is contained in:
@@ -33,7 +33,7 @@ func (h *Handler) VmModify(w http.ResponseWriter, r *http.Request) {
|
|||||||
prettyPrint(event)
|
prettyPrint(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (models.ConfigChangesReceived{} == event.CloudEvent.Data.ConfigChanges) {
|
if event.CloudEvent.Data.ConfigChanges == nil {
|
||||||
h.Logger.Debug("Received event contains no config change")
|
h.Logger.Debug("Received event contains no config change")
|
||||||
} else {
|
} else {
|
||||||
h.Logger.Debug("Received event contains config change info")
|
h.Logger.Debug("Received event contains config change info")
|
||||||
|
@@ -58,8 +58,8 @@ type CloudEventReceived struct {
|
|||||||
Value string `json:"Value"`
|
Value string `json:"Value"`
|
||||||
} `json:"Vm"`
|
} `json:"Vm"`
|
||||||
} `json:"Vm"`
|
} `json:"Vm"`
|
||||||
ConfigSpec *json.RawMessage `json:"configSpec"`
|
ConfigSpec *json.RawMessage `json:"configSpec"`
|
||||||
ConfigChanges ConfigChangesReceived `json:"configChanges"`
|
ConfigChanges *ConfigChangesReceived `json:"configChanges"`
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
} `json:"cloudEvent"`
|
} `json:"cloudEvent"`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user