http://compresscafe.i2p/blog/applying_the_diagnostics_pattern_in_practice.html
void { return writer.print ( "[{s}] {s}: {s} ({})" , . { @tagName ( d.level ) , @tagName ( d.component ) , d.message.constSlice () , d.err } ) ; } } ; pub const Diagnostics = struct { list : std.ArrayList ( Diagnostic ) , pub fn init ( ally : std.mem.Allocator ) Diagnostics { return . { .list = std.ArrayList ( Diagnostic ) .init ( ally ) } ; } pub fn deinit ( d : * Diagnostics ) void { d.list.deinit () ; } fn DiagRet ( comptime Err : type ) type { return...