Ver Fonte

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 há 8 anos atrás
pai
commit
9b9f289415
1 ficheiros alterados com 1 adições e 5 exclusões
  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
 }