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:
parent
3aa7eadbf8
commit
9b9f289415
1 changed files with 1 additions and 5 deletions
6
user.go
6
user.go
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue