Improved code documentation

This commit is contained in:
2019-09-10 09:49:51 +09:00
parent e774dccb08
commit 27753f6f9e
11 changed files with 28 additions and 24 deletions

View File

@ -102,7 +102,8 @@ func RenderObject(b *strings.Builder, obj interface{}, idPrefix string) {
}
}
// RenderField ...
// RenderField renders a single field. If that field is a struct,
// it will recursively go through all subfields.
func RenderField(b *strings.Builder, v *reflect.Value, field reflect.StructField, idPrefix string) {
fieldValue := reflect.Indirect(v.FieldByName(field.Name))