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

Add text/vfstemplate #10

merged 1 commit into from Jul 7, 2019


None yet
2 participants
Copy link

commented Jul 7, 2019

Your package httpfs is very helpful to me. Would it be possible to support text/template? That's just a copy of httpfs/html/vfstemplate with a few html replaced by text:

$ diff html/vfstemplate/vfstemplate.go text/vfstemplate/vfstemplate.go 
< // Package vfstemplate offers html/template helpers that use http.FileSystem.
> // Package vfstemplate offers text/template helpers that use http.FileSystem.
< 	"html/template"
> 	"text/template"
< 		return nil, fmt.Errorf("vfs/html/vfstemplate: pattern matches no files: %#q", pattern)
> 		return nil, fmt.Errorf("vfs/text/vfstemplate: pattern matches no files: %#q", pattern)
< 		return nil, fmt.Errorf("vfs/html/vfstemplate: no files named in call to ParseFiles")
> 		return nil, fmt.Errorf("vfs/text/vfstemplate: no files named in call to ParseFiles")

This comment has been minimized.

Copy link

commented Jul 7, 2019

Sure, I consider that in scope. Thanks for the PR, I’ll review and merge later tonight.

Copy link

left a comment

LGTM. Thanks.

@dmitshur dmitshur merged commit 8d4bc4b into shurcooL:master Jul 7, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.