mirror of
https://github.com/jech/galene.git
synced 2024-11-13 20:25:57 +01:00
Sort output of list-users and list-groups.
This commit is contained in:
parent
8446a39efc
commit
de09706edd
1 changed files with 6 additions and 0 deletions
|
@ -716,6 +716,9 @@ func listUsersCmd(cmdname string, args []string) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Get users: %v", err)
|
log.Fatalf("Get users: %v", err)
|
||||||
}
|
}
|
||||||
|
sort.Slice(users, func(i, j int) bool {
|
||||||
|
return users[i] < users[j]
|
||||||
|
})
|
||||||
for _, user := range users {
|
for _, user := range users {
|
||||||
fmt.Println(user)
|
fmt.Println(user)
|
||||||
}
|
}
|
||||||
|
@ -904,6 +907,9 @@ func listGroupsCmd(cmdname string, args []string) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Get groups: %v", err)
|
log.Fatalf("Get groups: %v", err)
|
||||||
}
|
}
|
||||||
|
sort.Slice(groups, func(i, j int) bool {
|
||||||
|
return groups[i] < groups[j]
|
||||||
|
})
|
||||||
for _, g := range groups {
|
for _, g := range groups {
|
||||||
fmt.Println(g)
|
fmt.Println(g)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue