Mastodon Feed: Post

Mastodon Feed

owl@beach.city wrote:

pub fn home() ?[]const u8 {
return switch (std.builtin.os.tag) {
.freebsd,
.linux,
.macos,
.netbsd,
.openbsd,
.solaris => std.os.getenv("HOME"),
.windows => std.os.getenv("USERPROFILE"),
else => @compileError("not implemented"),
};
}