Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MethodInfo ¶
MethodInfo 表示接口中一个方法的定义
type ServiceInfo ¶
type ServiceInfo struct {
Name string
Package string
Methods []MethodInfo
}
ServiceInfo 表示接口的信息
func ParseService ¶
func ParseService(ifacePtr interface{}) (*ServiceInfo, error)
ParseService 解析 interface 类型的方法信息 注意:input 必须是一个指向 interface 类型的指针(如 (*MyInterface)(nil)) 或者传入 reflect.Type(更推荐),但为简化 API,这里接受 interface{}
func (*ServiceInfo) String ¶
func (ii *ServiceInfo) String() string
String 实现 InterfaceInfo 的字符串表示(便于打印)
Click to show internal directories.
Click to hide internal directories.