Add test coverage to core
This commit is contained in:
16
core/user.go
Normal file
16
core/user.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package core
|
||||
|
||||
import "fmt"
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
}
|
||||
|
||||
// Mention generated a Discord mention string for the user
|
||||
func (user *User) Mention() string {
|
||||
if user == nil {
|
||||
return "<NULL>"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("<@%s>", user.ID)
|
||||
}
|
||||
Reference in New Issue
Block a user