From: qydysky Date: Thu, 17 Jun 2021 07:17:35 +0000 (+0800) Subject: fix X-Git-Tag: v0.5.28 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=95de04112fce655e03426159a6a30d5db79f183d;p=part%2F.git fix --- diff --git a/CheckFile.go b/CheckFile.go index 9c28bc4..d35dad0 100644 --- a/CheckFile.go +++ b/CheckFile.go @@ -55,7 +55,7 @@ func (t *checkfile) IsExist(f string) bool { _, err := os.Stat(f) if err != nil { - if os.IsNotExist(err) { + if errors.Is(err, os.ErrNotExist) { t.RV = append(t.RV,false,nil) return false }else{ diff --git a/tmplKV/tmplKV.go b/tmplKV/tmplKV.go index 26008d5..3cbe132 100644 --- a/tmplKV/tmplKV.go +++ b/tmplKV/tmplKV.go @@ -71,7 +71,7 @@ func (s *tmplKV) GetV(key interface{}) (value interface{}){ //检查Key Value是否对应及有效 func (s *tmplKV) Check(key,value interface{}) bool { ok,v := s.Get(key) - return ok && v == value + return ok && (v == value) } //当前储存器键值数量 diff --git a/tmplKV/tmplV.go b/tmplKV/tmplV.go index 6cf2c4c..8213eab 100644 --- a/tmplKV/tmplV.go +++ b/tmplKV/tmplV.go @@ -89,7 +89,7 @@ func (s *tmplV) Get(key uintptr) (isLive bool,contect string){ func (s *tmplV) Check(key uintptr,contect string) bool { ok,k := s.Get(key) - return ok && k == contect + return ok && (k == contect) } func (s *tmplV) Buf() (int64,int) {