help and README
This commit is contained in:
@@ -4,9 +4,11 @@ const stdout = std.io.getStdOut().writer();
|
||||
const Base64 = @import("base64.zig");
|
||||
|
||||
const usageText =
|
||||
\\Usage: baze64 {-d/-D} input
|
||||
\\Usage: baze64 {-d/-D} {-h/-H} input
|
||||
\\With no arguments, encodes input into a base64 string
|
||||
\\Args:
|
||||
\\ -d -D: decode instead of encode
|
||||
\\ -d -D: decodes a base64 string
|
||||
\\ -h -H: print this help
|
||||
;
|
||||
|
||||
|
||||
@@ -33,6 +35,9 @@ pub fn main() !void {
|
||||
|
||||
if (std.mem.eql(u8, arg, "-d") or std.mem.eql(u8, arg, "-D")) {
|
||||
decodeSwitch = true;
|
||||
} else if (std.mem.eql(u8, arg, "-h") or std.mem.eql(u8, arg, "-H")) {
|
||||
try stdout.print("{s}\n", .{usageText});
|
||||
std.process.exit(0);
|
||||
} else {
|
||||
input = arg;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user