package formatter import ( "fmt" "git.db.org.ai/dborg/internal/models" "git.db.org.ai/dborg/internal/utils" ) func FormatBSSIDResults(response models.BSSIDLookupResponse, asJSON bool) error { if asJSON { return utils.PrintJSON(response) } if len(response) == 0 { PrintWarning("No results found") return nil } PrintSection("BSSID Lookup Results") for i, result := range response { if i > 0 { PrintDivider() } fmt.Printf("\n%s: %s\n", Cyan("BSSID"), Bold(result.BSSID)) if result.Location != nil { fmt.Printf("%s: %s\n", Cyan("Latitude"), Yellow(fmt.Sprintf("%.6f", result.Location.Latitude))) fmt.Printf("%s: %s\n", Cyan("Longitude"), Yellow(fmt.Sprintf("%.6f", result.Location.Longitude))) fmt.Printf("%s: %s\n", Cyan("Accuracy"), Dim(fmt.Sprintf("%d meters", result.Location.Accuracy))) if result.GoogleMap != "" { fmt.Printf("%s: %s\n", Cyan("Google Maps"), result.GoogleMap) } if result.OpenStreetMap != "" { fmt.Printf("%s: %s\n", Cyan("OpenStreetMap"), result.OpenStreetMap) } } else { fmt.Printf("%s\n", Gray("No location data available")) } } fmt.Println() return nil }