Skip to content

Commit 56c13c2

Browse files
authored
Merge pull request #1495 from mojo-zd/master
remove unnecessary code
2 parents e21cd30 + ab1f64a commit 56c13c2

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

os/gstructs/gstructs_type.go

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ func StructType(object interface{}) (*Type, error) {
4848
}
4949

5050
exitLoop:
51-
for reflectKind == reflect.Ptr {
52-
reflectValue = reflectValue.Elem()
53-
reflectKind = reflectValue.Kind()
54-
}
5551
if reflectKind != reflect.Struct {
5652
return nil, errors.New(
5753
fmt.Sprintf(

protocol/goai/goai_path.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ func (oai *OpenApiV3) addPath(in addPathInput) error {
7878
} else {
7979
outputObject = reflect.New(reflectType.Out(0)).Elem()
8080
}
81-
for inputObject.Kind() == reflect.Ptr {
82-
inputObject = inputObject.Elem()
83-
}
84-
for outputObject.Kind() == reflect.Ptr {
85-
outputObject = outputObject.Elem()
86-
}
81+
8782
var (
8883
path = Path{}
8984
inputMetaMap = gmeta.Data(inputObject.Interface())

0 commit comments

Comments
 (0)