diff --git a/json-to-go-v2.js b/json-to-go-v2.js index 05cffa5..afe8753 100644 --- a/json-to-go-v2.js +++ b/json-to-go-v2.js @@ -518,11 +518,13 @@ if (typeof module === 'undefined' || !module.parent) { } const argument = val.replace(/-/g, '') - if (argument === "big") - console.warn(`Warning: The argument '${argument}' has been deprecated and has no effect anymore`) - else { - console.error(`Unexpected argument ${val} received`) - process.exit(1) + switch (argument) { + case "big": + console.warn(`Warning: The argument '${argument}' has been deprecated and has no effect anymore`) + break + default: + console.error(`Unexpected argument ${val} received`) + process.exit(1) } })