File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33//! is to delete this file and start with root.zig instead.
44
55pub fn main () ! void {
6- // Prints to stderr (it's a shortcut based on `std.io .getStdErr()`)
6+ // Prints to stderr (it's a shortcut based on `std.Io .getStdErr()`)
77 std .debug .print ("All your {s} are belong to us.\n " , .{"codebase" });
88
99 // stdout is for the actual output of your application, for example if you
1010 // are implementing gzip, then only the compressed bytes should be sent to
1111 // stdout, not any debugging messages.
12- const stdout_file = std .io .getStdOut ().writer ();
13- var bw = std .io .bufferedWriter (stdout_file );
12+ const stdout_file = std .Io .getStdOut ().writer ();
13+ var bw = std .Io .bufferedWriter (stdout_file );
1414 const stdout = bw .writer ();
1515
1616 try stdout .print ("Run `zig build test` to run the tests.\n " , .{});
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ pub fn main() !void {
1111
1212pub fn build_main (b : * std.Build , targets : []const []const u8 , ctx : ? * anyopaque ) ! void {
1313 _ = ctx ;
14- const stdout = std .io .getStdOut ().writer ();
14+ var stdout_file = std .fs .File .stdout ().writer (&.{});
15+ const stdout = & stdout_file .interface ;
1516 try stdout .writeAll (DotFileWriter .header );
1617 var gpa_alloc = std .heap .GeneralPurposeAllocator (.{}){};
1718 defer _ = gpa_alloc .deinit ();
You can’t perform that action at this time.
0 commit comments