print warning in resourceD if no resources are specified and report number of resources on startup

This commit is contained in:
blek 2023-11-16 19:03:51 +10:00
parent 6e500cf07b
commit d018c0c2ba
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,12 @@ func main() {
conf.Validate() conf.Validate()
if len(conf.Resource) == 0 {
fmt.Println("\x1b[33m[warn] No resources are specified\x1b[0m");
} else {
fmt.Println(fmt.Sprintf("[info] Loaded %d resources", len(conf.Resource)))
}
if ! conf.ResourceD.Enabled { if ! conf.ResourceD.Enabled {
fmt.Println("\x1b[33m[warn] resourceD is disabled. No resources will be served\x1b[0m") fmt.Println("\x1b[33m[warn] resourceD is disabled. No resources will be served\x1b[0m")
} }