Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Mar 3, 2025
1 parent 6c7b45f commit 9ca03c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion util/gconv/gconv_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func bindVarToStructField(
customConverterInput reflect.Value
ok bool
)
if cachedFieldInfo.IsCustomConvert {
if cachedFieldInfo.HasCustomConvert {
if customConverterInput, ok = srcValue.(reflect.Value); !ok {
customConverterInput = reflect.ValueOf(srcValue)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ type CachedFieldInfoBase struct {
// Purpose: reduce the interface asserting cost in runtime.
IsCommonInterface bool

// IsCustomConvert marks there custom converting function for this field type.
IsCustomConvert bool
// HasCustomConvert marks there custom converting function for this field type.
HasCustomConvert bool

// StructField is the type info of this field.
StructField reflect.StructField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (csi *CachedStructInfo) makeCachedFieldInfo(
StructField: field,
FieldIndexes: fieldIndexes,
ConvertFunc: csi.genFieldConvertFunc(field.Type.String()),
IsCustomConvert: csi.checkTypeHasCustomConvert(field.Type),
HasCustomConvert: csi.checkTypeHasCustomConvert(field.Type),
PriorityTagAndFieldName: csi.genPriorityTagAndFieldName(field, priorityTags),
RemoveSymbolsFieldName: utils.RemoveSymbols(field.Name),
}
Expand Down

0 comments on commit 9ca03c0

Please sign in to comment.