消息名(没有包,纯类型名)
(msg interface{})
| 239 | |
| 240 | // 消息名(没有包,纯类型名) |
| 241 | func MessageToName(msg interface{}) string { |
| 242 | |
| 243 | if msg == nil { |
| 244 | return "" |
| 245 | } |
| 246 | |
| 247 | meta := MessageMetaByMsg(msg) |
| 248 | if meta == nil { |
| 249 | return "" |
| 250 | } |
| 251 | |
| 252 | return meta.TypeName() |
| 253 | } |
| 254 | |
| 255 | func MessageToID(msg interface{}) int { |
| 256 |
no test coverage detected