github.com/songzhibin97/gkit@v1.2.13/parser/demo/demo.api (about) 1 package api 2 3 4 type Request struct { 5 MapField map[string]int 6 SliceField []int 7 StringField string 8 Uint32Field uint32 `gkit:"pType=fixed32;"` 9 // 注释1 10 // 注释1.1 11 12 // 注释1.2 13 InterfaceField interface{} 14 InterField Inter 15 EmptyField 16 } 17 18 19 20 type Inter interface { 21 Inter() 22 } 23 24 type EmptyField interface { 25 Empty() 26 } 27 28 type Response struct { 29 Message string 30 Username string 31 Password string 32 } 33 34 // 注释2 35 // 注释3 36 37 /* 38 注释5 39 注释6 40 */ 41 42 // @service:User 43 // @method:post 44 // @router:/register 45 func Register(req Request)(Response){ 46 47 48 49 // start 50 var _ = 1 51 // end 52 53 } 54 55 56 57 // @method:get 58 // @router:/register2 59 func Register2(req Request)(Response) { 60 // 注释func 61 }