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

Adding support for stdin: scheme for datasources #233

Merged
merged 1 commit into from
Nov 18, 2017

Conversation

hairyhenderson
Copy link
Owner

Fixes #230

Adds support for a stdin: scheme for datasources. For now, MIME type is specified by setting a bogus filename and the extension is used. If no parsing is required (i.e. if the data is being included verbatim with the include function), just stdin: is enough.

$ echo 'foo: bar' | gomplate -i '{{(ds "data").foo}}' -d data=stdin:///foo.yaml 
bar
$ echo 'foo' | gomplate -i '{{ include "data" }}' -d data=stdin:
foo

Signed-off-by: Dave Henderson [email protected]

@hairyhenderson hairyhenderson merged commit 99b5cec into master Nov 18, 2017
@hairyhenderson hairyhenderson deleted the stdin-datasource-230 branch November 18, 2017 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant