Browse Source

How about no? (#356)

I don't know why somebody would do something this inefficient, but I think plain concatination is a better approach
LEGOlord208 8 years ago
parent
commit
9b9f289415
1 changed files with 1 additions and 5 deletions
  1. 1 5
      user.go

+ 1 - 5
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
 }