aboutsummaryrefslogtreecommitdiff
path: root/msg.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-08 09:19:56 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-08 09:19:56 +0800
commitbaf853eda89e08b890367d5bfd018eda76ee481c (patch)
tree69f36828a98a91da43810de78e7f2e8f5cdeb631 /msg.go
parentRemove unnecessary anonymous function (diff)
downloadmeseircd-baf853eda89e08b890367d5bfd018eda76ee481c.tar.gz
meseircd-baf853eda89e08b890367d5bfd018eda76ee481c.tar.zst
meseircd-baf853eda89e08b890367d5bfd018eda76ee481c.zip
Omit msg.Tags nil check
Diffstat (limited to 'msg.go')
-rw-r--r--msg.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/msg.go b/msg.go
index 87ed1ab..98ebc14 100644
--- a/msg.go
+++ b/msg.go
@@ -24,7 +24,7 @@ type SMsg struct {
}
func (msg *SMsg) ClientSerialize() (final string) {
- if msg.Tags != nil && len(msg.Tags) != 0 {
+ if len(msg.Tags) != 0 {
final = "@"
for k, v := range msg.Tags {
// TODO: Tag values must be escaped
@@ -48,7 +48,7 @@ func (msg *SMsg) ClientSerialize() (final string) {
}
func (msg *SMsg) ServerSerialize() (final string) {
- if msg.Tags != nil && len(msg.Tags) != 0 {
+ if len(msg.Tags) != 0 {
final = "@"
for k, v := range msg.Tags {
// TODO: Tag values must be escaped