error strings should not be capitalized (ST1005)
This commit is contained in:
8
ftp.go
8
ftp.go
@@ -217,7 +217,7 @@ func (c *ServerConn) epsv() (port int, err error) {
|
||||
start := strings.Index(line, "|||")
|
||||
end := strings.LastIndex(line, "|")
|
||||
if start == -1 || end == -1 {
|
||||
err = errors.New("Invalid EPSV response format")
|
||||
err = errors.New("invalid EPSV response format")
|
||||
return
|
||||
}
|
||||
port, err = strconv.Atoi(line[start+3 : end])
|
||||
@@ -235,7 +235,7 @@ func (c *ServerConn) pasv() (host string, port int, err error) {
|
||||
start := strings.Index(line, "(")
|
||||
end := strings.LastIndex(line, ")")
|
||||
if start == -1 || end == -1 {
|
||||
err = errors.New("Invalid PASV response format")
|
||||
err = errors.New("invalid PASV response format")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ func (c *ServerConn) pasv() (host string, port int, err error) {
|
||||
pasvData := strings.Split(line[start+1:end], ",")
|
||||
|
||||
if len(pasvData) < 6 {
|
||||
err = errors.New("Invalid PASV response format")
|
||||
err = errors.New("invalid PASV response format")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ func (c *ServerConn) CurrentDir() (string, error) {
|
||||
end := strings.LastIndex(msg, "\"")
|
||||
|
||||
if start == -1 || end == -1 {
|
||||
return "", errors.New("Unsuported PWD response format")
|
||||
return "", errors.New("unsuported PWD response format")
|
||||
}
|
||||
|
||||
return msg[start+1 : end], nil
|
||||
|
||||
Reference in New Issue
Block a user