Skip to content

Commit

Permalink
some extra checks in find command
Browse files Browse the repository at this point in the history
  • Loading branch information
danslo committed Jan 10, 2025
1 parent d7c5104 commit 9d7c60f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/find/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ func main() {
ver = "unknown"
}
fmt.Printf("%s (ver: %s) at %s\n", store.Platform.Name(), ver, store.DocRoot)
fmt.Printf("DBC: %+v\n", store.Config.DB)
if store.Config != nil && store.Config.DB != nil {
fmt.Printf("DBC: %+v\n", store.Config.DB)
}

if urls, err := store.Platform.BaseURLs(context.Background(), store.DocRoot); err == nil {
if urls, err := store.Platform.BaseURLs(context.Background(), store.DocRoot); err == nil && len(urls) > 0 {
fmt.Println("Base URLs:")
for _, url := range urls {
fmt.Printf("- %s\n", url)
Expand Down

0 comments on commit 9d7c60f

Please sign in to comment.