Browse code

The first letter should be small in error of remote.go

Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>

YuPengZTE authored on 2016/10/17 16:19:10
Showing 1 changed files
... ...
@@ -33,7 +33,7 @@ var mimeRe = regexp.MustCompile(acceptableRemoteMIME)
33 33
 func MakeRemoteContext(remoteURL string, contentTypeHandlers map[string]func(io.ReadCloser) (io.ReadCloser, error)) (ModifiableContext, error) {
34 34
 	f, err := httputils.Download(remoteURL)
35 35
 	if err != nil {
36
-		return nil, fmt.Errorf("Error downloading remote context %s: %v", remoteURL, err)
36
+		return nil, fmt.Errorf("error downloading remote context %s: %v", remoteURL, err)
37 37
 	}
38 38
 	defer f.Body.Close()
39 39
 
... ...
@@ -44,7 +44,7 @@ func MakeRemoteContext(remoteURL string, contentTypeHandlers map[string]func(io.
44 44
 
45 45
 		contentType, contextReader, err = inspectResponse(contentType, f.Body, clen)
46 46
 		if err != nil {
47
-			return nil, fmt.Errorf("Error detecting content type for remote %s: %v", remoteURL, err)
47
+			return nil, fmt.Errorf("error detecting content type for remote %s: %v", remoteURL, err)
48 48
 		}
49 49
 		defer contextReader.Close()
50 50
 
... ...
@@ -118,7 +118,7 @@ func inspectResponse(ct string, r io.ReadCloser, clen int64) (string, io.ReadClo
118 118
 	preamble := make([]byte, plen, plen)
119 119
 	rlen, err := r.Read(preamble)
120 120
 	if rlen == 0 {
121
-		return ct, r, errors.New("Empty response")
121
+		return ct, r, errors.New("empty response")
122 122
 	}
123 123
 	if err != nil && err != io.EOF {
124 124
 		return ct, r, err