Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 'Stream<String>' return types for commands #84

Open
dblevins opened this issue Oct 29, 2019 · 0 comments
Open

Support 'Stream<String>' return types for commands #84

dblevins opened this issue Oct 29, 2019 · 0 comments

Comments

@dblevins
Copy link
Member

For example:

    @Command
    public Stream<String> listImports(final Dir dir) {
        return dir.searchJava()
                .map(Java::parse)
                .map(Java::getImports)
                .flatMap(Collection::stream);
    }

The contract would be each line is printed as a single line. The newline would be added automatically and need not be present in the individual string values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant