mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 18:15:45 +00:00
1 parent
5a9ecb82a3
commit
66da1b7b2f
1 file changed
+3
@@ -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