mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user