code: func getFieldNames(instance interface{}) []string {
  	var (
  		fields []string
  		v      = reflect.Indirect(reflect.ValueOf(instance))
  		t      = v.Type()
  	)
  
  	if t.Kind() != reflect.Struct {
  		return nil
  	}
  
  	for i := 0; i < v.NumField(); i++ {
  		var (
  			vField = v.Field(i)
  			tField = v.Type().Field(i)
  		)
  
  		// Is exportable?
  		if tField.PkgPath != "" {
  			continue
  		}
  
  		if tField.Type.Kind() == reflect.Struct && tField.Anonymous {
  			fields = append(fields, getFieldNames(vField.Interface())...)
  			continue
  		}
  
  		fields = append(fields, tField.Name)
  	}
  
  	return fields
  }
docs: // getFieldNames returns instance's field names.