mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-28 10:18:43 +00:00
cmd: Fix dump of void slice
Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
This commit is contained in:
committed by
Sjoerd Simons
parent
6c13b917b5
commit
af3a65297b
@@ -110,7 +110,7 @@ func DumpActionFields(iface interface{}, depth int) {
|
||||
|
||||
case reflect.Slice:
|
||||
s := reflect.ValueOf(f.Interface())
|
||||
if s.Index(0).Kind() == reflect.Struct {
|
||||
if s.Len() > 0 && s.Index(0).Kind() == reflect.Struct {
|
||||
log.Printf(" %s:\n", entries.Type().Field(i).Name)
|
||||
for j := 0; j < s.Len(); j++ {
|
||||
if s.Index(j).Kind() == reflect.Struct {
|
||||
|
||||
Reference in New Issue
Block a user