summaryrefslogtreecommitdiff
path: root/src/pkg/smtp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/smtp')
-rw-r--r--src/pkg/smtp/smtp.go6
-rw-r--r--src/pkg/smtp/smtp_test.go4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/smtp/smtp.go b/src/pkg/smtp/smtp.go
index d716df56b..2d5e86247 100644
--- a/src/pkg/smtp/smtp.go
+++ b/src/pkg/smtp/smtp.go
@@ -93,11 +93,11 @@ func (c *Client) ehlo() os.Error {
return err
}
ext := make(map[string]string)
- extList := strings.Split(msg, "\n", -1)
+ extList := strings.Split(msg, "\n")
if len(extList) > 1 {
extList = extList[1:]
for _, line := range extList {
- args := strings.Split(line, " ", 2)
+ args := strings.SplitN(line, " ", 2)
if len(args) > 1 {
ext[args[0]] = args[1]
} else {
@@ -106,7 +106,7 @@ func (c *Client) ehlo() os.Error {
}
}
if mechs, ok := ext["AUTH"]; ok {
- c.auth = strings.Split(mechs, " ", -1)
+ c.auth = strings.Split(mechs, " ")
}
c.ext = ext
return err
diff --git a/src/pkg/smtp/smtp_test.go b/src/pkg/smtp/smtp_test.go
index 49363adf0..c053557d7 100644
--- a/src/pkg/smtp/smtp_test.go
+++ b/src/pkg/smtp/smtp_test.go
@@ -64,8 +64,8 @@ func (f faker) Close() os.Error {
}
func TestBasic(t *testing.T) {
- basicServer = strings.Join(strings.Split(basicServer, "\n", -1), "\r\n")
- basicClient = strings.Join(strings.Split(basicClient, "\n", -1), "\r\n")
+ basicServer = strings.Join(strings.Split(basicServer, "\n"), "\r\n")
+ basicClient = strings.Join(strings.Split(basicClient, "\n"), "\r\n")
var cmdbuf bytes.Buffer
bcmdbuf := bufio.NewWriter(&cmdbuf)