mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
🎨 整理依赖
This commit is contained in:
parent
9709d20aa4
commit
8e7fafbdfe
8 changed files with 218 additions and 233 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue