arns-lt-tree-push-service/collector.go
2024-01-10 08:34:50 +02:00

27 lines
470 B
Go

package main
import (
"log"
"os"
zord_tree "g.arns.lt/zordsdavini/zord-tree"
)
var config = zord_tree.NewConfig(
[]string{".md"},
"__a",
customMeta,
[]string{"\\.sync_.{12}\\.db"},
)
func Collect() {
log.Println("Collect: start")
if _, err := os.Stat(source); os.IsNotExist(err) {
log.Print(err)
panic("Source directory does not exist.")
}
log.Println("Collect: pre")
_ = zord_tree.PopulateTree(source, meta, config)
log.Println("Collect: post")
}