Skip to content

Instantly share code, notes, and snippets.

@haze

haze/snip.zig Secret

Created May 5, 2020 16:53
Show Gist options
  • Save haze/181d7c9515b81fceb0f4b1cff7e5957a to your computer and use it in GitHub Desktop.
Save haze/181d7c9515b81fceb0f4b1cff7e5957a to your computer and use it in GitHub Desktop.
(no description)
const line = mem.trimRight(u8, socket_in_stream.readUntilDelimiterAlloc(self.allocator, '\n', 4096) catch |err| {
std.debug.warn("got error reading: {}", .{err});
switch (err) {
error.EndOfStream => break,
else => return err,
}
}, "\r\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment