stream.go
changeset 116 5c6d6d51d3ba
parent 114 a058e33c1666
child 118 fb9bb98a8d70
--- a/stream.go	Fri Dec 28 17:56:13 2012 -0700
+++ b/stream.go	Tue Mar 26 10:54:44 2013 -0600
@@ -79,8 +79,8 @@
 }
 
 func readXml(r io.Reader, ch chan<- interface{},
-extStanza map[string]func(*xml.Name) interface{}) {
-	if _, ok := Debug.(*noLog) ; !ok {
+	extStanza map[string]func(*xml.Name) interface{}) {
+	if _, ok := Debug.(*noLog); !ok {
 		pr, pw := io.Pipe()
 		go tee(r, pw, "S: ")
 		r = pr
@@ -152,7 +152,7 @@
 		// If it's a Stanza, we try to unmarshal its innerxml
 		// into objects of the appropriate respective
 		// types. This is specified by our extensions.
-		if st, ok := obj.(Stanza) ; ok {
+		if st, ok := obj.(Stanza); ok {
 			err = parseExtended(st.GetHeader(), extStanza)
 			if err != nil {
 				Warn.Logf("ext unmarshal: %s", err)
@@ -198,7 +198,7 @@
 }
 
 func writeXml(w io.Writer, ch <-chan interface{}) {
-	if _, ok := Debug.(*noLog) ; !ok {
+	if _, ok := Debug.(*noLog); !ok {
 		pr, pw := io.Pipe()
 		go tee(pr, w, "C: ")
 		w = pw
@@ -274,7 +274,7 @@
 // with the server. The control channel controls this loop's
 // activity.
 func writeStream(srvOut chan<- interface{}, cliIn <-chan Stanza,
-control <-chan int) {
+	control <-chan int) {
 	defer close(srvOut)
 
 	var input <-chan Stanza
@@ -306,7 +306,7 @@
 // Stanzas from the remote go up through a stack of filters to the
 // app. This function manages the filters.
 func filterTop(filterOut <-chan <-chan Stanza, filterIn chan<- <-chan Stanza,
-topFilter <-chan Stanza, app chan<- Stanza) {
+	topFilter <-chan Stanza, app chan<- Stanza) {
 	defer close(app)
 Loop:
 	for {
@@ -563,7 +563,7 @@
 
 // Computes the response string for digest authentication.
 func saslDigestResponse(username, realm, passwd, nonce, cnonceStr,
-authenticate, digestUri, nonceCountStr string) string {
+	authenticate, digestUri, nonceCountStr string) string {
 	h := func(text string) []byte {
 		h := md5.New()
 		h.Write([]byte(text))