mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 19:40:53 +00:00
parent
5a9ecb82a3
commit
66da1b7b2f
1 changed files with 3 additions and 0 deletions
|
@ -128,6 +128,9 @@ type resourceCopier interface {
|
|||
|
||||
// Copy copies r to the targetPath given.
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue