Shriram Rajagopalan 9 vuotta sitten
vanhempi
commit
0a075f2fed
2 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 3 3
      broker.go
  2. 1 1
      config.go

+ 3 - 3
broker.go

@@ -1,7 +1,9 @@
 package sarama
 
 import (
+	"bytes"
 	"crypto/tls"
+	"encoding/binary"
 	"fmt"
 	"io"
 	"net"
@@ -9,8 +11,6 @@ import (
 	"sync"
 	"sync/atomic"
 	"time"
-	"bytes"
-	"encoding/binary"
 )
 
 // Broker represents a single Kafka broker connection. All operations on this object are entirely concurrency-safe.
@@ -486,7 +486,7 @@ func (b *Broker) responseReceiver() {
 //
 // When credentials are valid, Kafka returns a 4 byte array of null characters.
 // When credentials are invalid, Kafka closes the connection. This does not seem to be the ideal way
-// of responding to bad credentials but thats how its being done today. 
+// of responding to bad credentials but thats how its being done today.
 func (b *Broker) doSASLPlainAuth() error {
 	authBytes := []byte("\x00" + b.conf.Net.SASL.User + "\x00" + b.conf.Net.SASL.Password)
 	buf := new(bytes.Buffer)

+ 1 - 1
config.go

@@ -40,7 +40,7 @@ type Config struct {
 			// (defaults to false).
 			Enable bool
 			//username and password for SASL/PLAIN authentication
-			User string
+			User     string
 			Password string
 		}