Replaced TODO comments with Go-style BUG(me) comments.
--- a/stream.go Wed Dec 28 12:50:08 2011 -0700
+++ b/stream.go Wed Dec 28 13:02:23 2011 -0700
@@ -34,7 +34,7 @@
f func(Stanza) bool
}
-// TODO Review all these *Client receiver methods. They should
+// BUG(cjyar) Review all these *Client receiver methods. They should
// probably either all be receivers, or none.
func (cl *Client) readTransport(w io.Writer) {
@@ -144,9 +144,9 @@
break
}
- // TODO If it's a Stanza, use reflection to search for
- // any Unrecognized elements and fill in their
- // attributes.
+ // BUG(cjyar) If it's a Stanza, use reflection to
+ // search for any Unrecognized elements and fill in
+ // their attributes.
// Put it on the channel.
ch <- obj
@@ -170,7 +170,7 @@
}
}
-// TODO This should go away. We shouldn't allow writing of
+// BUG(cjyar) This should go away. We shouldn't allow writing of
// unstructured data.
func writeText(w io.Writer, ch <-chan *string) {
if debug {
@@ -193,8 +193,8 @@
defer tryClose(srvIn, cliOut)
handlers := make(map[string] func(Stanza) bool)
- // TODO This for loop will never terminate, even when the
- // channels are closed.
+ // BUG(cjyar) This for loop will never terminate, even when
+ // the channels are closed.
for {
select {
case h := <- cl.handlers:
@@ -226,7 +226,7 @@
}
}
-// TODO Disable this loop until resource binding is
+// BUG(cjyar) Disable this loop until resource binding is
// complete. Otherwise the app might inject something weird into our
// negotiation stream.
func writeStream(srvOut chan<- interface{}, cliIn <-chan interface{}) {
@@ -307,7 +307,6 @@
cl.socketSync.Done()
}
-// TODO
// BUG(cjyar) Doesn't implement TLS/SASL EXTERNAL.
func (cl *Client) chooseSasl(fe *Features) {
var digestMd5 bool
--- a/structs.go Wed Dec 28 12:50:08 2011 -0700
+++ b/structs.go Wed Dec 28 13:02:23 2011 -0700
@@ -21,7 +21,7 @@
// entities. It looks like node@domain/resource. Node and resource are
// sometimes optional.
type JID struct {
- // TODO Make this not a pointer.
+ // BUG(cjyar) Make this not a pointer.
Node *string
Domain string
Resource string
@@ -30,7 +30,7 @@
var _ flag.Value = &JID{}
// XMPP's <stream:stream> XML element
-// TODO Hide this.
+// BUG(cjyar) Hide this.
type Stream struct {
To string `xml:"attr"`
From string `xml:"attr"`
@@ -42,14 +42,14 @@
var _ fmt.Stringer = &Stream{}
// <stream:error>
-// TODO Can this be consolidated with Error?
+// BUG(cjyar) Can this be consolidated with Error? Hide it if not.
type StreamError struct {
Any definedCondition
Text *errText
}
var _ xml.Marshaler = &StreamError{}
-// TODO Replace this with Unrecognized.
+// BUG(cjyar) Replace this with Unrecognized.
type definedCondition struct {
// Must always be in namespace nsStreams
XMLName xml.Name
@@ -62,7 +62,7 @@
}
var _ xml.Marshaler = &errText{}
-// TODO Store this in Client and make it available to the app.
+// BUG(cjyar) Store this in Client and make it available to the app.
type Features struct {
Starttls *starttls
Mechanisms mechs
@@ -155,7 +155,7 @@
var _ xml.Marshaler = &Error{}
// Holds an XML element not described by the more specific types.
-// TODO Rename this to something like Generic.
+// BUG(cjyar) Rename this to something like Generic.
type Unrecognized struct {
XMLName xml.Name
Any *Unrecognized
--- a/xmpp.go Wed Dec 28 12:50:08 2011 -0700
+++ b/xmpp.go Wed Dec 28 13:02:23 2011 -0700
@@ -6,8 +6,8 @@
// and 3921, plus the various XEPs at http://xmpp.org/protocols/.
package xmpp
-// TODO Figure out why the library doesn't exit when the server closes
-// its stream to us.
+// BUG(cjyar) Figure out why the library doesn't exit when the server
+// closes its stream to us.
import (
"bytes"
@@ -33,7 +33,7 @@
serverSrv = "xmpp-server"
clientSrv = "xmpp-client"
- // TODO Make this a parameter to NewClient, not a
+ // BUG(cjyar) Make this a parameter to NewClient, not a
// constant. We should have both a log level and a
// syslog.Writer, so the app can control how much time we
// spend generating log messages, as well as where they go.
@@ -58,14 +58,14 @@
// Incoming XMPP stanzas from the server will be published on
// this channel. Information which is only used by this
// library to set up the XMPP stream will not appear here.
- // TODO Make these channels of type Stanza.
+ // BUG(cjyar) Make these channels of type Stanza.
In <-chan interface{}
// Outgoing XMPP stanzas to the server should be sent to this
// channel.
Out chan<- interface{}
xmlOut chan<- interface{}
- // TODO Remove this. Make a Stanza parser method available for
- // use by interact.go and similar applications.
+ // BUG(cjyar) Remove this. Make a Stanza parser method
+ // available for use by interact.go and similar applications.
TextOut chan<- *string
}
var _ io.Closer = &Client{}