Skip to content

Commit 997f951

Browse files
committed
Fix error when no scanners are present
1 parent 09886ad commit 997f951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/dashboard/handlers/scannerHandlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type ScannersHandler struct {
1212
}
1313

1414
func (h *ScannersHandler) List(c *gin.Context) {
15-
var res []string
15+
res := make([]string, 0)
1616
for _, scanner := range h.Data.Scanners {
1717
res = append(res, scanner.Name())
1818
}

0 commit comments

Comments
 (0)