mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
resources: Add more details to .Err
This commit adds a .Data object (a map with `Body`, `StatusCode` etc.) to the .Err returned from `resources.GetRemote`, which means you can now do: ``` {{ with .Err }} {{ range $k, $v := .Data }} {{ end }} {{ end }} ``` Fixes #9708
This commit is contained in:
@@ -48,7 +48,7 @@ var (
|
||||
// PageNop implements Page, but does nothing.
|
||||
type nopPage int
|
||||
|
||||
func (p *nopPage) Err() error {
|
||||
func (p *nopPage) Err() resource.ResourceError {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@@ -120,7 +120,7 @@ type testPage struct {
|
||||
sectionEntries []string
|
||||
}
|
||||
|
||||
func (p *testPage) Err() error {
|
||||
func (p *testPage) Err() resource.ResourceError {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user