From aabae52169ec05cbb07b98ca8f49921333c65e63 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 22 Mar 2025 10:41:38 +0800 Subject: Use Source by value instead of pointer --- message.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/message.go b/message.go index 190c198..ffb29e8 100644 --- a/message.go +++ b/message.go @@ -10,7 +10,7 @@ import ( type Message struct { Command string - Source *Source + Source Source Tags map[string]string Args []string } @@ -47,8 +47,7 @@ func Parse(raw []byte) (msg Message, err error) { } sp[0] = sp[0][1:] - source := parseSource(sp[0]) - msg.Source = &source + msg.Source = parseSource(sp[0]) if len(sp) < 2 { err = ErrMalformedMsg -- cgit v1.2.3