mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
@@ -128,6 +128,9 @@ type resourceCopier interface {
|
|||||||
|
|
||||||
// Copy copies r to the targetPath given.
|
// Copy copies r to the targetPath given.
|
||||||
func Copy(r resource.Resource, targetPath string) resource.Resource {
|
func Copy(r resource.Resource, targetPath string) resource.Resource {
|
||||||
|
if r.Err() != nil {
|
||||||
|
panic(fmt.Sprintf("Resource has an .Err: %s", r.Err()))
|
||||||
|
}
|
||||||
return r.(resourceCopier).cloneTo(targetPath)
|
return r.(resourceCopier).cloneTo(targetPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user