mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05: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