From ea820a248e8e2f407419a1a1757eba24c52a0b89 Mon Sep 17 00:00:00 2001 From: MaineK00n Date: Wed, 14 Oct 2020 13:13:39 +0900 Subject: [PATCH] add struct ListenPorts --- models/packages.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/models/packages.go b/models/packages.go index 343d7118..a0c1b340 100644 --- a/models/packages.go +++ b/models/packages.go @@ -174,9 +174,15 @@ type Changelog struct { // AffectedProcess keep a processes information affected by software update type AffectedProcess struct { - PID string `json:"pid,omitempty"` - Name string `json:"name,omitempty"` - ListenPorts []string `json:"listenPorts,omitempty"` + PID string `json:"pid,omitempty"` + Name string `json:"name,omitempty"` + ListenPorts []ListenPorts `json:"listenPorts,omitempty"` +} + +// ListenPorts has the result of parsing the port information to the address and port. +type ListenPorts struct { + Address string `json:"address"` + Port string `json:"port"` } // NeedRestartProcess keep a processes information affected by software update