Skip to content

Integrate templates into bindata optionally #314

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

Merged
merged 14 commits into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed templates import paths
Since the -prefix option of go-bindata seems to be broken I'm forced to
rewrite the paths of the templates with sed.
  • Loading branch information
tboerger committed Dec 6, 2016
commit ee0ed2230fe061218b7fea2d79749154487a2807
2 changes: 1 addition & 1 deletion modules/templates/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Renderer(opts *Options) macaron.Handler {
AssetDir: AssetDir,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
Prefix: "../../templates",
Prefix: "",
},
),
})
Expand Down
2 changes: 2 additions & 0 deletions modules/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package templates

//go:generate go-bindata -tags "bindata" -ignore "\\.go" -pkg "templates" -o "bindata.go" ../../templates/...
//go:generate go fmt bindata.go
//go:generate sed -i.bak s/..\/..\/templates\/// bindata.go
//go:generate rm -f bindata.go.bak

// Options represents the available options to configure the macaron handler.
type Options struct {
Expand Down