mirror of
https://github.com/mpolden/echoip.git
synced 2025-07-16 22:13:33 +02:00
Rename package
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/mpolden/ipd/http"
|
||||
"github.com/mpolden/ipd/iputil"
|
||||
"github.com/mpolden/ipd/iputil/db"
|
||||
"github.com/mpolden/ipd/iputil/database"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -34,9 +34,9 @@ func main() {
|
||||
}
|
||||
log.Level = level
|
||||
|
||||
ipDb := db.Empty()
|
||||
db := database.Empty()
|
||||
if opts.CountryDBPath != "" || opts.CityDBPath != "" {
|
||||
ipDb, err = db.Open(opts.CountryDBPath, opts.CityDBPath)
|
||||
db, err = database.New(opts.CountryDBPath, opts.CityDBPath)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@ -55,7 +55,7 @@ func main() {
|
||||
log.Printf("Trusting header %s to contain correct remote IP", opts.IPHeader)
|
||||
}
|
||||
|
||||
server := http.New(ipDb, lookupAddr, lookupPort, log)
|
||||
server := http.New(db, lookupAddr, lookupPort, log)
|
||||
server.Template = opts.Template
|
||||
server.IPHeader = opts.IPHeader
|
||||
|
||||
|
Reference in New Issue
Block a user