]> 127.0.0.1 Git - part/.git/commitdiff
91 v0.1.9
authorqydysky <qydysky@foxmail.com>
Sun, 1 Nov 2020 18:23:38 +0000 (02:23 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 1 Nov 2020 18:23:38 +0000 (02:23 +0800)
Reqf.go
get/Get.go

diff --git a/Reqf.go b/Reqf.go
index bac56b164f1289f51a443c1d0bfee407f7bbb7a2..f74e972422614e09ee6fe9fa749a751d191c45f4 100644 (file)
--- a/Reqf.go
+++ b/Reqf.go
@@ -164,7 +164,9 @@ func (this *req) Reqf_1(val Rval) (error) {
                 return err
             }
         }else{
-            this.Respon,_ = ioutil.ReadAll(resp.Body)
+            var err error
+            this.Respon,err = ioutil.ReadAll(resp.Body)
+            if err != nil {return err}
         }
     }
     
index 3b5ee96e3bf25c5fdddde648160558644fb9ff83..aaeb12187396f9d2554ad4f15f32e6dfa8678a1f 100644 (file)
@@ -44,7 +44,7 @@ func SS(source,stratS,endS string, startI,lenI int) (string,error) {
                if startI < len(s){ts = startI}
        }
 
-       if ts == 0 {return "", errors.New("no start symbol in " + s)}
+       if ts == 0 {return "", errors.New("no start symbol "+ stratS +" in " + s)}
 
        if endS != "" {
                if tmp := strings.Index(s[ts:], endS);tmp != -1{te = ts + tmp}
@@ -52,7 +52,7 @@ func SS(source,stratS,endS string, startI,lenI int) (string,error) {
                if startI + lenI < len(s){te = startI + lenI}
        }
 
-       if te == 0 {return "", errors.New("no stop symbol in " + s)}
+       if te == 0 {return "", errors.New("no stop symbol "+ endS +" in " + s)}
 
        return s[ts:te], nil
 }