🎨 整理依赖

This commit is contained in:
Liang Ding 2022-07-14 21:36:35 +08:00
parent 9709d20aa4
commit 8e7fafbdfe
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 218 additions and 233 deletions

View file

@ -24,7 +24,6 @@ import (
"time"
"github.com/88250/gulu"
"github.com/denisbrodbeck/machineid"
"github.com/dustin/go-humanize"
)
@ -65,17 +64,6 @@ func RandomSleep(minMills, maxMills int) {
time.Sleep(time.Duration(r) * time.Millisecond)
}
func GetDeviceID() string {
if "std" == Container {
machineID, err := machineid.ID()
if nil != err {
return gulu.Rand.String(12)
}
return machineID
}
return gulu.Rand.String(12)
}
func SetNetworkProxy(proxyURL string) {
if err := os.Setenv("HTTPS_PROXY", proxyURL); nil != err {
logger.Errorf("set env [HTTPS_PROXY] failed: %s", err)