printable for userpass

This commit is contained in:
ginuerzh
2015-10-12 20:00:27 +08:00
parent a77d04567a
commit 35f5f2d12c
+10
View File
@@ -176,6 +176,11 @@ func (req *UserPassRequest) Write(w io.Writer) error {
return err
}
func (req *UserPassRequest) String() string {
return fmt.Sprintf("%d %s:%s",
req.Version, req.Username, req.Password)
}
/*
Username/Password authentication response
+----+--------+
@@ -219,6 +224,11 @@ func (res *UserPassResponse) Write(w io.Writer) error {
return err
}
func (res *UserPassResponse) String() string {
return fmt.Sprintf("%d %d",
res.Version, res.Status)
}
type Addr struct {
Type uint8
Host string