]> 127.0.0.1 Git - part/.git/commitdiff
fix v0.5.28
authorqydysky <qydysky@foxmail.com>
Thu, 17 Jun 2021 07:17:35 +0000 (15:17 +0800)
committerqydysky <qydysky@foxmail.com>
Thu, 17 Jun 2021 07:17:35 +0000 (15:17 +0800)
CheckFile.go
tmplKV/tmplKV.go
tmplKV/tmplV.go

index 9c28bc4d6f568907b6368668aa927af1f86e49d6..d35dad0ec3fa28b05dff9f19c61cb2dcb961d479 100644 (file)
@@ -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{
index 26008d5d8b65a9762cc6dae8885714e09bf6a3f7..3cbe13238cb209389601e6c85ac18620c69a4b05 100644 (file)
@@ -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)
 }
 
 //当前储存器键值数量
index 6cf2c4cec8cceae75e3e3eb73d8209ac9e38eda4..8213eabda556cb60734409c223668310eaf94816 100644 (file)
@@ -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) {