As the title suggests, I want to separate argv and env from the main() function and handle them separately, but I am inexperienced and do not know how to operate them
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
defer {
const deinit_status = gpa.deinit();
if (deinit_status == .leak) @panic("TEST FAIL");
}
const argv = try std.process.argsAlloc(allocator);
defer std.process.argsFree(allocator, argv);
const env = std.os.environ;
for (argv) |value| {
std.debug.print("{s}", .{value});
}
for (env) |value| {
std.debug.print("{s}", .{value});
}
}