From 77b275130b32d3f9ee408c11cd90da803ece30db Mon Sep 17 00:00:00 2001 From: mStar aka a person <12024604-mstarongitlab@users.noreply.gitlab.com> Date: Mon, 29 Jan 2024 17:10:00 +0000 Subject: [PATCH] Add String function to AccountHandle --- types/types.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/types.go b/types/types.go index 0f6462c..c83caae 100644 --- a/types/types.go +++ b/types/types.go @@ -1,8 +1,15 @@ package types -import "net/url" +import ( + "fmt" + "net/url" +) type AccountHandle struct { Name string Host url.URL } + +func (a *AccountHandle) String() string { + return fmt.Sprintf("%s@%s", a.Name, a.Host.String()) +}