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

20 lines
364 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"
2023-06-29 12:33:25 +00:00
"log"
2022-08-02 05:16:11 +00:00
"os"
)
func Collect() {
2023-06-29 12:33:25 +00:00
log.Println("Collect: start")
2022-08-02 05:16:11 +00:00
if _, err := os.Stat(source); os.IsNotExist(err) {
2023-06-29 12:33:25 +00:00
log.Print(err)
2022-08-02 05:16:11 +00:00
panic("Source directory does not exist.")
}
2023-06-29 12:33:25 +00:00
log.Println("Collect: pre")
2023-06-28 21:10:54 +00:00
_ = zord_tree.PopulateTree(source, meta, customMeta)
2023-06-29 12:33:25 +00:00
log.Println("Collect: post")
2022-08-02 05:16:11 +00:00
}