移除 machineid
This commit is contained in:
1
go.mod
1
go.mod
@ -3,7 +3,6 @@ module next-terminal
|
|||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/denisbrodbeck/machineid v1.0.1
|
|
||||||
github.com/gliderlabs/ssh v0.3.3
|
github.com/gliderlabs/ssh v0.3.3
|
||||||
github.com/gofrs/uuid v3.3.0+incompatible
|
github.com/gofrs/uuid v3.3.0+incompatible
|
||||||
github.com/gorilla/websocket v1.4.2
|
github.com/gorilla/websocket v1.4.2
|
||||||
|
@ -33,7 +33,6 @@ import (
|
|||||||
"golang.org/x/text/encoding/simplifiedchinese"
|
"golang.org/x/text/encoding/simplifiedchinese"
|
||||||
"golang.org/x/text/transform"
|
"golang.org/x/text/transform"
|
||||||
|
|
||||||
"github.com/denisbrodbeck/machineid"
|
|
||||||
"github.com/gofrs/uuid"
|
"github.com/gofrs/uuid"
|
||||||
errors2 "github.com/pkg/errors"
|
errors2 "github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -436,10 +435,6 @@ func VerifyRSA(plainText, signText []byte, rsaPublicKey string) bool {
|
|||||||
return err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetMachineId() (string, error) {
|
|
||||||
return machineid.ID()
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAvailablePort 获取可用端口
|
// GetAvailablePort 获取可用端口
|
||||||
func GetAvailablePort() (int, error) {
|
func GetAvailablePort() (int, error) {
|
||||||
addr, err := net.ResolveTCPAddr("tcp", "localhost:0")
|
addr, err := net.ResolveTCPAddr("tcp", "localhost:0")
|
||||||
|
Reference in New Issue
Block a user