mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
Some godoc adjustments and image struct renames
This commit is contained in:
parent
11047534e4
commit
fa80fe3c8a
23 changed files with 193 additions and 90 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
"github.com/gohugoio/hugo/hugofs"
|
||||
"github.com/gohugoio/hugo/media"
|
||||
"github.com/gohugoio/hugo/output"
|
||||
"github.com/gohugoio/hugo/resources/images"
|
||||
"github.com/gohugoio/hugo/resources/page"
|
||||
"github.com/gohugoio/hugo/resources/resource"
|
||||
"github.com/spf13/afero"
|
||||
|
@ -131,19 +132,19 @@ func newTestResourceOsFs(c *qt.C) (*Spec, string) {
|
|||
return spec, workDir
|
||||
}
|
||||
|
||||
func fetchSunset(c *qt.C) resource.Image {
|
||||
func fetchSunset(c *qt.C) images.ImageResource {
|
||||
return fetchImage(c, "sunset.jpg")
|
||||
}
|
||||
|
||||
func fetchImage(c *qt.C, name string) resource.Image {
|
||||
func fetchImage(c *qt.C, name string) images.ImageResource {
|
||||
spec := newTestResourceSpec(specDescriptor{c: c})
|
||||
return fetchImageForSpec(spec, c, name)
|
||||
}
|
||||
|
||||
func fetchImageForSpec(spec *Spec, c *qt.C, name string) resource.Image {
|
||||
func fetchImageForSpec(spec *Spec, c *qt.C, name string) images.ImageResource {
|
||||
r := fetchResourceForSpec(spec, c, name)
|
||||
|
||||
img := r.(resource.Image)
|
||||
img := r.(images.ImageResource)
|
||||
|
||||
c.Assert(img, qt.Not(qt.IsNil))
|
||||
c.Assert(img.(specProvider).getSpec(), qt.Not(qt.IsNil))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue