Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
IPINFO is a Go-based web service that provides IP geolocation information through multiple API endpoints.
Sign in to like and favorite skills
IPINFO is a Go-based web service that provides IP geolocation information through multiple API endpoints. The service returns IP details in various formats (JSON, XML, HTML, plain text) and includes geographical, timezone, and network information.
ipinfo.goconf/ package handles JSON configurationhandle/ package manages all HTTP endpointsconf/)handle/)/, /short, /compact, /json, /xml, /html, /full, /version, /healthipinfo.go)gofmtgolangci-lint for code quality (config in golangci.yml)*_test.go patternhttptest package| Endpoint | Description | Response Format |
|---|---|---|
| Default detailed IP info | Plain text |
| Concise IP information | Plain text |
| Minimal IP details | Plain text |
| Structured IP data | JSON |
| Structured IP data | XML |
| Human-readable page | HTML |
| Enhanced HTML page | HTML |
| Application version | JSON |
| Health check | JSON |
config.json or ipinfo.json: Main configurationGeoLite2-City.mmdb: MaxMind database fileCONFIG: Override default config file pathPORT: Override default server portDEBUG: Enable debug loggingmake build # Build binary make start # Start service make stop # Stop service make restart # Restart service
make docker # Build Docker image make docker_linux_amd64 # Build for Linux AMD64
-u $UID:$UID)/health endpoint for load balancer checkshandle/ package with new handlersconf/ package structuresapi.mdDEBUG=1 environment variableRemember to update this documentation when making significant changes to the project structure or adding new features.