arns-lt-tree-push-service/collector.go

19 lines
359 B
Go
Raw Normal View History

2022-08-02 05:16:11 +00:00
package main
import (
zord_tree "g.arns.lt/zordsdavini/zord-tree"
"os"
)
func Collect() {
if _, err := os.Stat(dest); os.IsNotExist(err) {
panic("Destination directory does not exist.")
}
if _, err := os.Stat(source); os.IsNotExist(err) {
panic("Source directory does not exist.")
}
_ = zord_tree.PopulateTree(source, dest, meta, customMeta)
}