func CopyFile(src, dst string) {
	log.Infof("Copying '%s' to '%s'\n", src, dst)
	srcFile, err := os.Open(src)
	if err != nil {
		log.Fatalf("Failed to open source file '%s', reason: %s\n", src, err)
	}
	defer srcFile.Close()
	dstFile, err := os.Create(dst)
	if err != nil {
		log.Fatalf("Failed to open destination file '%s', reason: %s\n", dst, err)
	}
	defer srcFile.Close()
	if _, err = io.Copy(dstFile, srcFile); err != nil {
		log.Infof("Failed to copy from '%s' to '%s', reason: %s\n", src, dst, err)
	}
	log.Goodln("Done.")
}
// CopyFile copies the contents of a file from one location to another
CopyFile copies the contents of a file from one location to another
// CopyFile copies the contents of a file from one location to another
func CopyFile(src, dst string) {
	log.Infof("Copying '%s' to '%s'\n", src, dst)
	srcFile, err := os.Open(src)
	if err != nil {
		log.Fatalf("Failed to open source file '%s', reason: %s\n", src, err)
	}
	defer srcFile.Close()
	dstFile, err := os.Create(dst)
	if err != nil {
		log.Fatalf("Failed to open destination file '%s', reason: %s\n", dst, err)
	}
	defer srcFile.Close()
	if _, err = io.Copy(dstFile, srcFile); err != nil {
		log.Infof("Failed to copy from '%s' to '%s', reason: %s\n", src, dst, err)
	}
	log.Goodln("Done.")
}
func CopyFile ( src , dst string ) { log . Infof ( " \n " , src , dst ) srcFile , err := os . Open ( src ) if err != nil { log . Fatalf ( " \n " , src , err ) } defer srcFile . Close ( ) dstFile , err := os . Create ( dst ) if err != nil { log . Fatalf ( " \n " , dst , err ) } defer srcFile . Close ( ) if _ , err = io . Copy ( dstFile , srcFile ) ; err != nil { log . Infof ( " \n " , src , dst , err ) } log . Goodln ( " " ) }
CopyFile copies the contents of a file from one location to another
CopyFile copies the contents of a file from one location to another