diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-30 00:51:42 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-30 00:51:42 -0800 |
commit | baff54c47216a93c1e3ef4275b7b9ee7387a94bc (patch) | |
tree | d5004afd1be4a9de7f949fe8efe5d4db7052255d /management/editor | |
parent | e4c4136071d80ec9280df2d6fa39f4d9083c060c (diff) |
testing built-in type support beyond string/[]string for content types
Diffstat (limited to 'management/editor')
-rw-r--r-- | management/editor/elements.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/management/editor/elements.go b/management/editor/elements.go index 27069d8..72e6009 100644 --- a/management/editor/elements.go +++ b/management/editor/elements.go @@ -584,13 +584,8 @@ func valueFromStructField(name string, post interface{}) string { s := []string{} for i := 0; i < field.Len(); i++ { - item := field.Slice(i, field.Len()) - if item.Len() > 0 { - ss := item.Interface().([]int) - pos := ss[0] - s = append(s, fmt.Sprintf("%v", pos)) - } - + pos := field.Index(i) + s = append(s, fmt.Sprintf("%v", pos)) } return strings.Join(s, "__ponzu") |