diff --git a/os/gstructs/gstructs_type.go b/os/gstructs/gstructs_type.go index b1ab79204..1d0caf39b 100644 --- a/os/gstructs/gstructs_type.go +++ b/os/gstructs/gstructs_type.go @@ -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( diff --git a/protocol/goai/goai_path.go b/protocol/goai/goai_path.go index 9fd305a73..92fb81572 100644 --- a/protocol/goai/goai_path.go +++ b/protocol/goai/goai_path.go @@ -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())