From 9b9f2894154e3ee50c2165086873a0785ed4c24d Mon Sep 17 00:00:00 2001 From: LEGOlord208 Date: Fri, 14 Apr 2017 18:07:36 +0200 Subject: [PATCH] How about no? (#356) I don't know why somebody would do something this inefficient, but I think plain concatination is a better approach --- user.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/user.go b/user.go index 99fe501..1da0a71 100644 --- a/user.go +++ b/user.go @@ -1,9 +1,5 @@ package discordgo -import ( - "fmt" -) - // A User stores all data for an individual Discord user. type User struct { ID string `json:"id"` @@ -19,5 +15,5 @@ type User struct { //String returns a unique identifier of the form username#discriminator func (u *User) String() string { - return fmt.Sprintf("%s#%s", u.Username, u.Discriminator) + return u.Username + "#" + u.Discriminator }