Skip to content

Commit 2544665

Browse files
committed
fix(binding): fix the judgment of whether the parameter type exists
Change-Id: I3e25668c0b52843fb20a52a3dad71f6bdff70d03
1 parent abc8bd3 commit 2544665

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

binding/receiver.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ type receiver struct {
6666
func (r *receiver) assginIn(i in, v bool) {
6767
switch i {
6868
case path:
69-
r.hasPath = v
69+
r.hasPath = r.hasPath || v
7070
case query:
71-
r.hasQuery = v
71+
r.hasQuery = r.hasQuery || v
7272
case form, json, protobuf:
73-
r.hasBody = v
73+
r.hasBody = r.hasBody || v
7474
case cookie:
75-
r.hasCookie = v
75+
r.hasCookie = r.hasCookie || v
7676
}
7777
}
7878

0 commit comments

Comments
 (0)