Login() is a function on its own.

It allows to try multiple logins without closing the connection.
Drop the useless ConnectAnonymous.
This commit is contained in:
jlaffaye
2011-09-06 18:27:30 +02:00
parent b70c76ed28
commit 6aaa275d08
2 changed files with 16 additions and 18 deletions

View File

@@ -11,7 +11,12 @@ const (
)
func TestConn(t *testing.T) {
c, err := ConnectAnonymous("localhost:21")
c, err := Connect("localhost:21")
if err != nil {
t.Fatal(err)
}
err = c.Login("anonymous", "anonymous")
if err != nil {
t.Fatal(err)
}