This commit is contained in:
1 parent
dc3c5d1068
commit
44d3bc71ed
2 files changed
+7
-7
No files matched your search
@@ -72,7 +72,7 @@ func PrintStructContents(s interface{}, indentLevel int) string {
|
||||
case reflect.Struct:
|
||||
if fieldType.Type == reflect.TypeOf(time.Time{}) {
|
||||
// Handle time.Time field
|
||||
result.WriteString(fmt.Sprintf("%v\n", field.Interface().(time.Time).Format("2006-01-02 15:04:05")))
|
||||
result.WriteString(fmt.Sprintf("%v\n", field.Interface().(time.Time).Format("2006-12-24 15:04:05")))
|
||||
} else {
|
||||
result.WriteString("\n")
|
||||
result.WriteString(PrintStructContents(field.Interface(), indentLevel+1))
|
||||
|
||||
Reference in new issue
Block a user