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

mustache: add missing support for partials for embedded filesystems #104

Merged
merged 5 commits into from
Mar 23, 2021

Conversation

zachmann
Copy link
Contributor

No description provided.

Copy link
Member

@ReneWerner87 ReneWerner87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the effort, can you add an example in the readme and write a unittest

@zachmann
Copy link
Contributor Author

I updated the PR:

  • I updated the behavior of the NewFileSystem function; it will now use the passed filesystem also for partials. The other function I added NewFileSystemPartials can be used to set another filesystem for the partials.
    • Note: This changes the default behavior a bit (but it now should be what is expected, imho). The path of the included partials (specified in the template files) now must be relative to the embedded filesystem root and not to the current working directory as before.
  • I updated the Readme; there already was a reference (in the comments) to using an embedded filesystem, I updated that a bit.
  • Unittest: There also already was a unit test; I updated that to the (new) behavior. However, it is difficult to write a meaningful unittest for this, because the true meaning of the test is only given when executed from another working directory.

@ReneWerner87 ReneWerner87 linked an issue Mar 23, 2021 that may be closed by this pull request
@ReneWerner87 ReneWerner87 merged commit 7512de5 into gofiber:master Mar 23, 2021
@ReneWerner87 ReneWerner87 changed the title mustache: fix missing support for partials for embedded filesystems mustache: add missing support for partials for embedded filesystems Mar 23, 2021
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.

mustache: partials not working with embedded filesystems
2 participants