Changes to Default Performer Images (for Accessibility) (#1489)

* Changes to support custom URL paths
* Refactor image resolver code
* Initialise box files at startup
* Update packr

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
capnrowdy
2021-08-10 13:51:31 +10:00
committed by GitHub
parent 3e78d642a2
commit 404eaa32d2
487 changed files with 24741 additions and 29244 deletions

View File

@@ -4,7 +4,6 @@ import (
"github.com/gobuffalo/packr/v2/file"
"github.com/gobuffalo/packr/v2/file/resolver"
"github.com/gobuffalo/packr/v2/plog"
"github.com/pkg/errors"
)
// Pointer is a resolvr which resolves
@@ -22,11 +21,11 @@ func (p Pointer) Resolve(box string, path string) (file.File, error) {
plog.Debug(p, "Resolve", "box", box, "path", path, "forward-box", p.ForwardBox, "forward-path", p.ForwardPath)
b, err := findBox(p.ForwardBox)
if err != nil {
return nil, errors.WithStack(err)
return nil, err
}
f, err := b.Resolve(p.ForwardPath)
if err != nil {
return f, errors.WithStack(errors.Wrap(err, path))
return f, err
}
plog.Debug(p, "Resolve", "box", box, "path", path, "file", f)
return file.NewFileR(path, f)