Merge pull request #1495 from mojo-zd/master

remove unnecessary code
This commit is contained in:
John Guo
2021-11-26 20:38:06 +08:00
committed by GitHub
2 changed files with 1 additions and 10 deletions

View File

@ -48,10 +48,6 @@ func StructType(object interface{}) (*Type, error) {
}
exitLoop:
for reflectKind == reflect.Ptr {
reflectValue = reflectValue.Elem()
reflectKind = reflectValue.Kind()
}
if reflectKind != reflect.Struct {
return nil, errors.New(
fmt.Sprintf(

View File

@ -78,12 +78,7 @@ func (oai *OpenApiV3) addPath(in addPathInput) error {
} else {
outputObject = reflect.New(reflectType.Out(0)).Elem()
}
for inputObject.Kind() == reflect.Ptr {
inputObject = inputObject.Elem()
}
for outputObject.Kind() == reflect.Ptr {
outputObject = outputObject.Elem()
}
var (
path = Path{}
inputMetaMap = gmeta.Data(inputObject.Interface())