pluginIDAndTopic extracts message ID and topic name.
(msg *ClientComMessage)
| 717 | |
| 718 | // pluginIDAndTopic extracts message ID and topic name. |
| 719 | func pluginIDAndTopic(msg *ClientComMessage) (string, string) { |
| 720 | if msg.Hi != nil { |
| 721 | return msg.Hi.Id, "" |
| 722 | } |
| 723 | if msg.Acc != nil { |
| 724 | return msg.Acc.Id, "" |
| 725 | } |
| 726 | if msg.Login != nil { |
| 727 | return msg.Login.Id, "" |
| 728 | } |
| 729 | if msg.Sub != nil { |
| 730 | return msg.Sub.Id, msg.Sub.Topic |
| 731 | } |
| 732 | if msg.Leave != nil { |
| 733 | return msg.Leave.Id, msg.Leave.Topic |
| 734 | } |
| 735 | if msg.Pub != nil { |
| 736 | return msg.Pub.Id, msg.Pub.Topic |
| 737 | } |
| 738 | if msg.Get != nil { |
| 739 | return msg.Get.Id, msg.Get.Topic |
| 740 | } |
| 741 | if msg.Set != nil { |
| 742 | return msg.Set.Id, msg.Set.Topic |
| 743 | } |
| 744 | if msg.Del != nil { |
| 745 | return msg.Del.Id, msg.Del.Topic |
| 746 | } |
| 747 | if msg.Note != nil { |
| 748 | return "", msg.Note.Topic |
| 749 | } |
| 750 | return "", "" |
| 751 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…