From 1c115b8f6773ad85b89441d085c501d16d105f39 Mon Sep 17 00:00:00 2001 From: iseki Date: Thu, 24 Nov 2022 14:05:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=BA=E5=99=A8id=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version/machine_id.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/version/machine_id.go b/version/machine_id.go index bc8404be..17284943 100644 --- a/version/machine_id.go +++ b/version/machine_id.go @@ -2,9 +2,12 @@ package version import ( "github.com/denisbrodbeck/machineid" - "github.com/murphysecurity/murphysec/utils/must" ) func MachineId() string { - return must.A(machineid.ProtectedID("murphysec")) + s, e := machineid.ProtectedID("murphysec") + if e != nil { + return "" + } + return s }