mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-17 09:37:02 +00:00
Remove types for sort.Interface
This commit is contained in:
7
user.go
7
user.go
@@ -19,13 +19,6 @@ type User struct {
|
||||
forwards []string
|
||||
}
|
||||
|
||||
// UserSlice attaches the methods of sort.Interface to []*User.
|
||||
type UserSlice []*User
|
||||
|
||||
func (p UserSlice) Len() int { return len(p) }
|
||||
func (p UserSlice) Less(i, j int) bool { return p[i].Name() < p[j].Name() }
|
||||
func (p UserSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||
|
||||
// NewUser creates a new User instance.
|
||||
func NewUser(name, hashedPassword string, forwards []string) (*User, error) {
|
||||
u := &User{}
|
||||
|
||||
Reference in New Issue
Block a user