25 lines
397 B
Go
25 lines
397 B
Go
|
package release
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/magefile/mage/mg"
|
||
|
"github.com/otiai10/copy"
|
||
|
)
|
||
|
|
||
|
func Copy(src, dst string) error {
|
||
|
if mg.Verbose() {
|
||
|
fmt.Printf("Copying file from '%s' to '%s'\n", src, dst)
|
||
|
}
|
||
|
return copy.Copy(dst, src)
|
||
|
}
|
||
|
|
||
|
func MultiCopy(files map[string]string) error {
|
||
|
for dst, src := range files {
|
||
|
if err := Copy(src, dst); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
return nil
|
||
|
}
|