Add encode subcommand
Wraps gid.encodeGid, prints the packed-u32 as decimal on stdout, emits usage on stderr on bad arity, and a labelled error on out-of-range or non-integer input.
This commit is contained in:
@@ -30,7 +30,7 @@ function run(argv, { out, err }) {
|
||||
return 0;
|
||||
}
|
||||
const handlers = {
|
||||
// populated in subsequent tasks
|
||||
encode: require('./commands/encode'),
|
||||
};
|
||||
const handler = handlers[head];
|
||||
if (!handler) {
|
||||
|
||||
Reference in New Issue
Block a user