1
0
mirror of https://github.com/directorz/mailfull-go.git synced 2025-12-18 10:07:03 +00:00

Remove types for sort.Interface

This commit is contained in:
teru
2017-07-25 12:29:23 +09:00
parent 58b50cb3f6
commit c7e56f26af
9 changed files with 10 additions and 38 deletions

View File

@@ -57,7 +57,7 @@ func (c *CmdUsers) Run(args []string) int {
c.Meta.Errorf("%v\n", err)
return 1
}
sort.Sort(mailfull.UserSlice(users))
sort.Slice(users, func(i, j int) bool { return users[i].Name() < users[j].Name() })
for _, user := range users {
fmt.Fprintf(c.UI.Writer, "%s\n", user.Name())