shogo/internal/shodan/myip.go
perp 07c61c1b1c 🎉 Beginning
First push for beginning of project
2023-08-01 23:35:47 +01:00

22 lines
370 B
Go

package shodan
import (
"context"
"fmt"
"git.tcp.direct/perp/shogo/internal/utils"
)
// Return your IP address
func MyIp() {
// Fetch IP address
results, err := utils.Client.GetMyIP(context.Background())
if err != nil {
fmt.Printf("%s: %s\n", utils.Red("Error"), err.Error())
return
}
// Print results
fmt.Printf("%s\n", utils.Blue(results.String()))
}