summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2015-03-16 19:43:02 +0100
committerDaniel Martí <mvdan@mvdan.cc>2015-03-16 19:43:02 +0100
commit08647ec58034ecdc4ea60e7eb37c9e91fff784d6 (patch)
tree3e8cd30ef8e58d1bc729e47a2b1b2b9572901aa5
parent714581df514c74199c47451a2bc3a51cb34ccabd (diff)
Run go fmt
-rw-r--r--common/drbg/hash_drbg.go2
-rw-r--r--common/ntor/ntor.go1
-rw-r--r--common/probdist/weighted_dist.go2
-rw-r--r--transports/obfs2/obfs2.go2
-rw-r--r--transports/obfs3/obfs3.go1
5 files changed, 4 insertions, 4 deletions
diff --git a/common/drbg/hash_drbg.go b/common/drbg/hash_drbg.go
index 2cd1ec7..7feb9e8 100644
--- a/common/drbg/hash_drbg.go
+++ b/common/drbg/hash_drbg.go
@@ -30,8 +30,8 @@
package drbg
import (
- "encoding/hex"
"encoding/binary"
+ "encoding/hex"
"fmt"
"hash"
diff --git a/common/ntor/ntor.go b/common/ntor/ntor.go
index f17e464..4f6ab27 100644
--- a/common/ntor/ntor.go
+++ b/common/ntor/ntor.go
@@ -146,6 +146,7 @@ func NodeIDFromHex(encoded string) (*NodeID, error) {
return NewNodeID(raw)
}
+
// Bytes returns a pointer to the raw NodeID.
func (id *NodeID) Bytes() *[NodeIDLength]byte {
return (*[NodeIDLength]byte)(id)
diff --git a/common/probdist/weighted_dist.go b/common/probdist/weighted_dist.go
index 811a8a0..5f8e88e 100644
--- a/common/probdist/weighted_dist.go
+++ b/common/probdist/weighted_dist.go
@@ -237,7 +237,7 @@ func (w *WeightedDist) String() string {
for i, v := range w.values {
p := w.weights[i]
if p > 0.01 { // Squelch tiny probabilities.
- buf.WriteString(fmt.Sprintf("%d: %f ", v, p))
+ buf.WriteString(fmt.Sprintf("%d: %f ", v, p))
}
}
buf.WriteString("]")
diff --git a/transports/obfs2/obfs2.go b/transports/obfs2/obfs2.go
index 3490646..ad15671 100644
--- a/transports/obfs2/obfs2.go
+++ b/transports/obfs2/obfs2.go
@@ -46,7 +46,7 @@ import (
)
const (
- transportName = "obfs2"
+ transportName = "obfs2"
sharedSecretArg = "shared-secret"
clientHandshakeTimeout = time.Duration(30) * time.Second
diff --git a/transports/obfs3/obfs3.go b/transports/obfs3/obfs3.go
index 7844443..dd9281b 100644
--- a/transports/obfs3/obfs3.go
+++ b/transports/obfs3/obfs3.go
@@ -351,7 +351,6 @@ func (conn *obfs3Conn) Write(b []byte) (n int, err error) {
return conn.tx.Write(b)
}
-
var _ base.ClientFactory = (*obfs3ClientFactory)(nil)
var _ base.ServerFactory = (*obfs3ServerFactory)(nil)
var _ base.Transport = (*Transport)(nil)