Initial release cleanup.

This commit is contained in:
Erik C. Thauvin 2022-01-26 16:39:22 -08:00
parent 89b7769e1e
commit 334f34d84d
5 changed files with 47 additions and 13 deletions

View file

@ -50,6 +50,10 @@ dart compile exe bin/dcat.dart
```
## Library Usage
```sh
dart pub add dcat
```
```dart
import 'package:dcat/dcat.dart';
@ -88,10 +92,12 @@ A `CatResult` object is returned which contains the `exitCode` (`exitSuccess` or
final result =
await cat(['path/to/file'], stdout, showLineNumbers: true);
if (result.exitCode == exitSuccess) { // or result.isSuccess
...
// ...
} else {
for (final error in result.errors) {
stderr.writeln("Error with '${error.path}': ${error.message}");
}
}
```
```
[View Full Example](https://github.com/ethauvin/dcat/blob/master/example/example.dart)