feat: #1
parent
8aa35a546f
commit
631261d8af
|
@ -11,6 +11,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
"time"
|
||||
|
||||
"github.com/robfig/cron/v3"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -187,7 +188,11 @@ func GetPublicIP() (string, error) {
|
|||
if secure {
|
||||
protocol = "https://"
|
||||
}
|
||||
res, err := http.Get(protocol + host + ":" + port + "?name=" + name)
|
||||
req, _ := http.NewRequest("GET", protocol+host+":"+port+"?name="+name, nil)
|
||||
client := &http.Client{
|
||||
Timeout: time.Second * 10,
|
||||
}
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return "", err
|
||||
|
|
Loading…
Reference in New Issue