WhereGo

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2025 License: MIT

README

WhereGo

CI Go Report Card Docker Pulls License

🚀 The fastest open-source IP geolocation API built with Go and Fiber.

Features

  • Ultra-fast - Zero-allocation hot path, ~500ns per lookup
  • 🔄 Prefork mode - Utilizes all CPU cores
  • 🐳 Docker ready - Multi-arch images (amd64/arm64)
  • 📦 Tiny image - ~20MB distroless container
  • 🛡️ Production ready - Health checks, graceful shutdown

Quick Start

Docker
docker run -p 8080:8080 gustavosett/wherego:latest
From Source
git clone https://github.com/gustavosett/WhereGo.git
cd WhereGo
go run ./cmd/api

API Endpoints

Lookup IP
curl http://localhost:8080/lookup/8.8.8.8

Response:

{
  "ip": "8.8.8.8",
  "country": "United States",
  "city": "Mountain View",
  "iso_code": "US",
  "timezone": "America/Los_Angeles"
}
Health Check
curl http://localhost:8080/health

Response:

{"status":"ok"}

Performance

Benchmarks on AMD Ryzen 9 5900X:

Metric Value
Requests/sec ~200,000+
Latency (p99) <100μs
Memory ~60MB
Allocations 0 per request

Configuration

Environment Variable Default Description
PREFORK false Enable prefork mode for multi-core

License

MIT License - see LICENSE for details.

Directories

Path Synopsis
cmd
api command
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL