shithub: hugo

Download patch

ref: 0cc936583ba14b2dc6451843f897abbf550cf091
parent: c15c7da42a1c7bc535cc16cca2b341526f8cf169
author: Bjørn Erik Pedersen <[email protected]>
date: Mon Sep 3 05:22:36 EDT 2018

resource: Fix broken build

--- a/resource/bundler/bundler.go
+++ b/resource/bundler/bundler.go
@@ -19,6 +19,7 @@
 	"io"
 	"path/filepath"
 
+	"github.com/gohugoio/hugo/common/hugio"
 	"github.com/gohugoio/hugo/media"
 	"github.com/gohugoio/hugo/resource"
 )
@@ -36,7 +37,7 @@
 
 type multiReadSeekCloser struct {
 	mr      io.Reader
-	sources []resource.ReadSeekCloser
+	sources []hugio.ReadSeekCloser
 }
 
 func (r *multiReadSeekCloser) Read(p []byte) (n int, err error) {
@@ -75,8 +76,8 @@
 			resolvedm = r.MediaType()
 		}
 
-		concatr := func() (resource.ReadSeekCloser, error) {
-			var rcsources []resource.ReadSeekCloser
+		concatr := func() (hugio.ReadSeekCloser, error) {
+			var rcsources []hugio.ReadSeekCloser
 			for _, s := range resources {
 				rcr, ok := s.(resource.ReadSeekCloserResource)
 				if !ok {
--- a/resource/create/create.go
+++ b/resource/create/create.go
@@ -20,6 +20,7 @@
 
 	"github.com/spf13/afero"
 
+	"github.com/gohugoio/hugo/common/hugio"
 	"github.com/gohugoio/hugo/resource"
 )
 
@@ -53,8 +54,8 @@
 			c.rs.BaseFs.Resources.Fs,
 			resource.ResourceSourceDescriptor{
 				LazyPublish: true,
-				OpenReadSeekCloser: func() (resource.ReadSeekCloser, error) {
-					return resource.NewReadSeekerNoOpCloserFromString(content), nil
+				OpenReadSeekCloser: func() (hugio.ReadSeekCloser, error) {
+					return hugio.NewReadSeekerNoOpCloserFromString(content), nil
 				},
 				RelTargetFilename: filepath.Clean(targetPath)})