summaryrefslogtreecommitdiffstats
path: root/core/data.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/data.go')
-rw-r--r--core/data.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/data.go b/core/data.go
index e3fd560..fdad424 100644
--- a/core/data.go
+++ b/core/data.go
@@ -236,3 +236,12 @@ func ReadAddr(addrStr string) (Addr, error) {
return addr, nil
}
+
+func (a Addr) String() string {
+ var prefix string
+ if a.Type == AddrGroup {
+ prefix = "#"
+ }
+
+ return fmt.Sprintf("%s%s@%s", prefix, a.Channel, a.Host)
+}