This's a Golang version which migrates from:
- public-gateway-checker An online webpage of JS version
- ipfg A shell cli version
go get github.com/gingerhot/ipfg
After installation, there will be a command ipfg
available for you.
ipfg # to get one available gateway url for you
ipfg all # get all available gateway urls
ipfg help # show help message
And you can import github.com/gingerhot/utils
in your code, just as what I do in the main.go.
There're two methods for you: Get()
and ActiveList()
. More detail: godoc