Просмотр исходного кода

auth: use "sort.Strings" instead of StringSlice

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 8 лет назад
Родитель
Сommit
645c7c9a92
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      auth/store.go

+ 1 - 1
auth/store.go

@@ -458,7 +458,7 @@ func (as *authStore) UserGrantRole(r *pb.AuthUserGrantRoleRequest) (*pb.AuthUser
 	}
 
 	user.Roles = append(user.Roles, r.Role)
-	sort.Sort(sort.StringSlice(user.Roles))
+	sort.Strings(user.Roles)
 
 	putUser(tx, user)