Fix non pointer reference
I broke this not realizing I needed to use a pointer reference.
This commit is contained in:
4
main.go
4
main.go
@@ -14,7 +14,8 @@ func main() {
|
|||||||
utils.ParseFlags(&ip, &properties, &detail)
|
utils.ParseFlags(&ip, &properties, &detail)
|
||||||
|
|
||||||
// Use the IP-API to lookup the IP address
|
// Use the IP-API to lookup the IP address
|
||||||
data := ipapi.Lookup(ip, properties)
|
data, err := ipapi.Lookup(&ip, &properties)
|
||||||
|
utils.HandleError(err)
|
||||||
|
|
||||||
// Format the data to a string
|
// Format the data to a string
|
||||||
result := ipapi.GetProperties(data, properties, detail)
|
result := ipapi.GetProperties(data, properties, detail)
|
||||||
@@ -22,5 +23,4 @@ func main() {
|
|||||||
// Print result with PrintOut
|
// Print result with PrintOut
|
||||||
utils.PrintOut(result)
|
utils.PrintOut(result)
|
||||||
utils.Exit(0)
|
utils.Exit(0)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user