exitcode 1.0.1 exitcode: ^1.0.1 copied to clipboard
Preferred system exit codes as defined by sysexits.h from FreeBSD.
import 'dart:io';
import 'package:exitcode/exitcode.dart' as exitcode;
void main(List<String> arguments) {
if (arguments.isEmpty) {
stdout.writeln('You should provide an argument!');
exit(exitcode.usage);
} else {
stdout.writeln('Nice, you provided "${arguments.first}" as the first argument!');
}
}