ashani
unread,Feb 13, 2011, 12:15:39 AM2/13/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Thanks for you help !
It is now compiling after I added the last "," ...
my actual code snippet is:
.......
func execQuit (conn net.Conn, req string ) (os.Error, string) {
var resp string
err := sendCtrlCmd(conn, "QUIT");
if err == nil {
err, _, resp = recvCtrlResp(conn)
}
return err, resp
}
func execPass (conn net.Conn, cmd string) (os.Error, string) {
var resp string
err := sendCtrlCmd(conn, "PASS " + cmd)
if err == nil {
err, _, resp = recvCtrlResp(conn)
}
return err, resp
}
func execUser (conn net.Conn, cmd string) (os.Error, string) {
var resp string
err := sendCtrlCmd(conn, "USER " + cmd)
if err == nil {
err, _, resp = recvCtrlResp(conn)
}
return err, resp
}
var commandTable = map [string] func(net.Conn, string ) (os.Error,
string) {
"QUIT" : execQuit,
"PASS" : execPass,
"USER" : execUser,
}
....