Skip to content

Commit

Permalink
Update main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
eiqnepm committed Feb 3, 2024
1 parent d23f056 commit 6879578
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/portcheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ func main() {
continue
}

log.Println(string(output))

ids := []string{"restart"}
for _, line := range strings.Split(string(output), "\n") {
var container struct {
ID string `json:"ID"`
}

if err := json.Unmarshal([]byte(line), &container); err != nil {
log.Println(line)
log.Println(err)
continue
}
Expand Down

0 comments on commit 6879578

Please sign in to comment.