summaryrefslogtreecommitdiff
path: root/common
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 /common
parent714581df514c74199c47451a2bc3a51cb34ccabd (diff)
Run go fmt
Diffstat (limited to 'common')
-rw-r--r--common/drbg/hash_drbg.go2
-rw-r--r--common/ntor/ntor.go1
-rw-r--r--common/probdist/weighted_dist.go2
3 files changed, 3 insertions, 2 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("]")