Clean up codebase and fix server host binding for IPv6 support
Cleanup: - Remove unused aircraft-icon.svg (replaced by type-specific icons) - Remove test files: beast-dump-with-heli.bin, beast.test, main, old.json, ux.png - Remove duplicate config.json.example (kept config.example.json) - Remove empty internal/coverage/ directory - Move CLAUDE.md to project root - Update assets.go documentation to reflect current icon structure - Format all Go code with gofmt Server Host Binding Fix: - Fix critical bug where server host configuration was ignored - Add host parameter to Server struct and NewWebServer constructor - Rename NewServer to NewWebServer for better clarity - Fix IPv6 address formatting in server binding (wrap in brackets) - Update startup message to show correct bind address format - Support localhost-only, IPv4, IPv6, and interface-specific binding This resolves the "too many colons in address" error for IPv6 hosts like ::1 and enables proper localhost-only deployment as configured. Closes #15 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
67d0e0612a
commit
0d60592b9f
16 changed files with 266 additions and 289 deletions
|
|
@ -30,7 +30,7 @@ type CountryInfo struct {
|
|||
// NewDatabase creates a new ICAO database with comprehensive allocation data
|
||||
func NewDatabase() (*Database, error) {
|
||||
allocations := getICAOAllocations()
|
||||
|
||||
|
||||
// Sort allocations by start address for efficient binary search
|
||||
sort.Slice(allocations, func(i, j int) bool {
|
||||
return allocations[i].StartAddr < allocations[j].StartAddr
|
||||
|
|
@ -265,4 +265,4 @@ func (d *Database) LookupCountry(icaoHex string) (*CountryInfo, error) {
|
|||
// Close is a no-op since we don't have any resources to clean up
|
||||
func (d *Database) Close() error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue