mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-02 23:08:49 +01:00
♻️ 通过域名 siyuan.localhost 加载 https://github.com/siyuan-note/siyuan/issues/6368
This commit is contained in:
parent
f8d01913a4
commit
8bc889659b
19 changed files with 38 additions and 47 deletions
|
|
@ -17,9 +17,7 @@
|
|||
package util
|
||||
|
||||
import (
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
|
@ -50,16 +48,3 @@ func JsonArg(c *gin.Context, result *gulu.Result) (arg map[string]interface{}, o
|
|||
ok = true
|
||||
return
|
||||
}
|
||||
|
||||
func isPortOpen(port string) bool {
|
||||
timeout := time.Second
|
||||
conn, err := net.DialTimeout("tcp", net.JoinHostPort("127.0.0.1", port), timeout)
|
||||
if nil != err {
|
||||
return false
|
||||
}
|
||||
if nil != conn {
|
||||
conn.Close()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue