How about no? (#356)

I don't know why somebody would do something this inefficient, but I think plain concatination is a better approach
This commit is contained in:
LEGOlord208 2017-04-14 18:07:36 +02:00 committed by Chris Rhodes
parent 3aa7eadbf8
commit 9b9f289415

View file

@ -1,9 +1,5 @@
package discordgo package discordgo
import (
"fmt"
)
// A User stores all data for an individual Discord user. // A User stores all data for an individual Discord user.
type User struct { type User struct {
ID string `json:"id"` ID string `json:"id"`
@ -19,5 +15,5 @@ type User struct {
//String returns a unique identifier of the form username#discriminator //String returns a unique identifier of the form username#discriminator
func (u *User) String() string { func (u *User) String() string {
return fmt.Sprintf("%s#%s", u.Username, u.Discriminator) return u.Username + "#" + u.Discriminator
} }