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
merged 1 commit into from Jul 7, 2019

Conversation

Projects
None yet
2 participants
@casipw
Copy link
Contributor

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 
1c1
< // Package vfstemplate offers html/template helpers that use http.FileSystem.
---
> // Package vfstemplate offers text/template helpers that use http.FileSystem.
6d5
< 	"html/template"
8a8
> 	"text/template"
33c33
< 		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)
43c43
< 		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")
@dmitshur

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

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

@dmitshur
Copy link
Member

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
Details
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.