Files
flutter-go/go-cli/bin/goCli.dart
2019-06-10 10:59:23 +08:00

17 lines
469 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:args/args.dart'; // 使用其中两个类ArgParser和ArgResults
import 'package:args/command_runner.dart';
import '../src/cli_command_runder.dart';
ArgResults argResults; // 声明ArgResults类型的顶级变量保存解析的参数结果
// 同时argResults也是ArgResults的实例
void main(List<String> args) async {
// createDemo();
try {
await run(args);
} on UsageException catch (e) {
print(' ');
print(e.usage);
}
}