{"action":"created","issue":{"url":"https://api.github.com/repos/CloudyKit/jet/issues/50","repository_url":"https://api.github.com/repos/CloudyKit/jet","labels_url":"https://api.github.com/repos/CloudyKit/jet/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/CloudyKit/jet/issues/50/comments","events_url":"https://api.github.com/repos/CloudyKit/jet/issues/50/events","html_url":"https://github.com/CloudyKit/jet/pull/50","id":208756026,"number":50,"title":"Improve custom loaders","user":{"login":"annismckenzie","id":16936,"avatar_url":"https://avatars.githubusercontent.com/u/16936?v=3","gravatar_id":"","url":"https://api.github.com/users/annismckenzie","html_url":"https://github.com/annismckenzie","followers_url":"https://api.github.com/users/annismckenzie/followers","following_url":"https://api.github.com/users/annismckenzie/following{/other_user}","gists_url":"https://api.github.com/users/annismckenzie/gists{/gist_id}","starred_url":"https://api.github.com/users/annismckenzie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annismckenzie/subscriptions","organizations_url":"https://api.github.com/users/annismckenzie/orgs","repos_url":"https://api.github.com/users/annismckenzie/repos","events_url":"https://api.github.com/users/annismckenzie/events{/privacy}","received_events_url":"https://api.github.com/users/annismckenzie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-19T23:27:52Z","updated_at":"2017-02-20T11:30:31Z","closed_at":"2017-02-20T11:06:00Z","pull_request":{"url":"https://api.github.com/repos/CloudyKit/jet/pulls/50","html_url":"https://github.com/CloudyKit/jet/pull/50","diff_url":"https://github.com/CloudyKit/jet/pull/50.diff","patch_url":"https://github.com/CloudyKit/jet/pull/50.patch"},"body":"I got to play around with the new loaders you guys added in #48 and there are a few things that caught my eye while switching from my naive implementation (the one in #37).\r\n\r\nBecause we're always loading templates from the file system in development and only switch to a binary packaged `http.FileSystem` I needed to copy over your `osFileSystemLoader` implementation – it wasn't exported so I couldn't instantiate it myself. That made me write another custom loader to stitch that and the `httpfs` loader together. All in all I felt like this could be improved so here goes:\r\n1. I made the `osFileSystemLoader` public so it can be used on its own and I didn't see any disadvantage in keeping this private to the library.\r\n2. I added a simple multi loader implementation that is still a `jet.Loader` but can be used with a list of custom loaders.\r\n\r\nNow, would you accept this into the core? I don't want to continue with it if you aren't.\r\n\r\nIf you are, however, then I'd like to polish it with some tests, a nice example of using `vfsgen` in an app that loads templates from the file system in development but switches to a packaged `http.FileSystem` when compiled and also add a bit of documentation of how to use this to the wiki."},"comment":{"url":"https://api.github.com/repos/CloudyKit/jet/issues/comments/281055838","html_url":"https://github.com/CloudyKit/jet/pull/50#issuecomment-281055838","issue_url":"https://api.github.com/repos/CloudyKit/jet/issues/50","id":281055838,"user":{"login":"annismckenzie","id":16936,"avatar_url":"https://avatars.githubusercontent.com/u/16936?v=3","gravatar_id":"","url":"https://api.github.com/users/annismckenzie","html_url":"https://github.com/annismckenzie","followers_url":"https://api.github.com/users/annismckenzie/followers","following_url":"https://api.github.com/users/annismckenzie/following{/other_user}","gists_url":"https://api.github.com/users/annismckenzie/gists{/gist_id}","starred_url":"https://api.github.com/users/annismckenzie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annismckenzie/subscriptions","organizations_url":"https://api.github.com/users/annismckenzie/orgs","repos_url":"https://api.github.com/users/annismckenzie/repos","events_url":"https://api.github.com/users/annismckenzie/events{/privacy}","received_events_url":"https://api.github.com/users/annismckenzie/received_events","type":"User","site_admin":false},"created_at":"2017-02-20T11:30:31Z","updated_at":"2017-02-20T11:30:31Z","body":"Yes, you're right – do you want me to add it?\r\n\r\n@VojtechVitek: no, we can't have it return `jet.Loader` as you'd lose the ability to call `AddPath()` on that (since those are not part of the interface)."}}
{"actor":{"display_login":"annismckenzie"}}