Group.fromReader

This commit is contained in:
2022-06-07 05:32:21 +03:00
parent e238db9b60
commit 31b5bb2d72
3 changed files with 51 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
const flags = @import("../flags.zig");
const User = @import("../User.zig");
const Group = @import("../Group.zig");
const usage =
\\usage: turbonss-unix2db [options]
@@ -66,8 +67,10 @@ fn execute(
defer groupFile.close();
var users = try User.fromReader(allocator, passwdFile.reader());
var groups = try Group.fromReader(allocator, groupFile.reader());
try stderr.print("read {d} users\n", .{users.len});
try stderr.print("read {d} groups\n", .{groups.len});
return 0;
}