-
Notifications
You must be signed in to change notification settings - Fork 0
/
speargun.dart
34 lines (25 loc) · 967 Bytes
/
speargun.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* speargun - a command-line interface to DigitalOcean's API in Dart
*
* As I iterate through the learning process to build this out, I'm starting here:
* https://www.dartlang.org/docs/tutorials/cmdline/
*
*/
//import 'dart:async';
//import 'dart:convert';
import 'dart:io';
//import 'package:args/args.dart';
const LINE_NUMBER = 'line-number';
var NEWLINE = '\n';
//ArgResults argResults;
void main(List<String> arguments){
print('speargun initializing...');
// Check for the API key file: https://api.dartlang.org/134830/dart-io/File-class.html
if( new File('DigitalOceanAPI.key').existsSync() ){ // https://api.dartlang.org/134830/dart-io/FileSystemEntity/existsSync.html
print('Got the key!');
} else {
print('OHNOES! You need to create a DigitalOceanAPI.key file with your DigitalOcean API key pasted as plain text inside...');
}
// final parser = new ArgParser()
// ..addFlag(LINE_NUMBER, negatable: false, abbr: 'n');
}