File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,10 @@ func (o *ProtoParseItem) parseRPC(r *proto.RPC) {
6161 Operation : funcName ,
6262 GroupName : groupName ,
6363 }
64- v , ok := o .GroupFunc [groupName ]
65- if ok {
66- v = append (v , item )
67- continue
64+ _ , ok := o .GroupFunc [groupName ]
65+ if ! ok {
66+ o .GroupFunc [groupName ] = make ([]FuncParseItem , 0 )
6867 }
69- o .GroupFunc [groupName ] = make ([]FuncParseItem , 0 )
7068 o .GroupFunc [groupName ] = append (o .GroupFunc [groupName ], item )
7169 }
7270 }
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ package pb
22
33var TestServerOperationGroup = map [string ][]string {
44 "auth" : {
5- "cart.service.v1.Cart.GetCart" ,
5+ "/cart.service.v1.Cart/GetCart" ,
6+ "/cart.service.v1.Cart/DeleteCart" ,
67 },
78 "auth2" : {
8- "cart.service.v1.Cart.GetCart" ,
9+ "/cart.service.v1.Cart/GetCart" ,
10+ "/cart.service.v1.Cart/DeleteCart" ,
911 },
1012}
1113
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ service Cart {
1010 // @tags: auth,auth2
1111 rpc GetCart (GetCartReq ) returns (GetCartReply ) {}
1212 // comment
13- // @tags:
13+ // @tags: auth,auth2
1414 rpc DeleteCart (DeleteCartReq ) returns (DeleteCartReply ) {}
1515
1616 rpc AddItem (AddItemReq ) returns (AddItemReply ) {}
You can’t perform that action at this time.
0 commit comments