forked from bisq-network/bisq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bisq-network#4097 from ghubstan/remove-read-stdin-…
…loop Remove read stdin loop
- Loading branch information
Showing
7 changed files
with
89 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package bisq.cli.app; | ||
|
||
import joptsimple.OptionParser; | ||
|
||
import static java.lang.System.out; | ||
|
||
final class CommandParser { | ||
|
||
// Option name constants | ||
static final String HELP = "help"; | ||
static final String GETBALANCE = "getbalance"; | ||
static final String GETVERSION = "getversion"; | ||
static final String STOPSERVER = "stopserver"; | ||
|
||
OptionParser configure() { | ||
OptionParser parser = new OptionParser(); | ||
parser.allowsUnrecognizedOptions(); | ||
parser.nonOptions(GETBALANCE).ofType(String.class).describedAs("get btc balance"); | ||
parser.nonOptions(GETVERSION).ofType(String.class).describedAs("get bisq version"); | ||
return parser; | ||
} | ||
|
||
static void printHelp() { | ||
out.println("Usage: bisq-cli getbalance | getversion"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters