From 4772d4a1a444ee224091790f74464707ed07820f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Wed, 2 Jul 2014 18:04:59 +0200 Subject: [PATCH] goimports -w . --- accept.go | 1 + chain.go | 9 +++++---- chain_test.go | 3 ++- checkpoints.go | 1 + common_test.go | 5 +++-- difficulty.go | 3 ++- difficulty_test.go | 3 ++- error_test.go | 3 ++- internal_test.go | 3 ++- log.go | 3 ++- merkle.go | 3 ++- merkle_test.go | 3 ++- process.go | 1 + reorganization_test.go | 7 ++++--- scriptval.go | 5 +++-- timesorter_test.go | 3 ++- txlookup.go | 1 + validate.go | 7 ++++--- validate_test.go | 9 +++++---- 19 files changed, 46 insertions(+), 27 deletions(-) diff --git a/accept.go b/accept.go index fc488767..b94ae48d 100644 --- a/accept.go +++ b/accept.go @@ -6,6 +6,7 @@ package btcchain import ( "fmt" + "github.com/conformal/btcutil" ) diff --git a/chain.go b/chain.go index 312c6b10..ffe05ac8 100644 --- a/chain.go +++ b/chain.go @@ -8,14 +8,15 @@ import ( "container/list" "errors" "fmt" - "github.com/conformal/btcdb" - "github.com/conformal/btcnet" - "github.com/conformal/btcutil" - "github.com/conformal/btcwire" "math/big" "sort" "sync" "time" + + "github.com/conformal/btcdb" + "github.com/conformal/btcnet" + "github.com/conformal/btcutil" + "github.com/conformal/btcwire" ) const ( diff --git a/chain_test.go b/chain_test.go index 17b53de9..562eb733 100644 --- a/chain_test.go +++ b/chain_test.go @@ -5,11 +5,12 @@ package btcchain_test import ( + "testing" + "github.com/conformal/btcchain" "github.com/conformal/btcnet" "github.com/conformal/btcutil" "github.com/conformal/btcwire" - "testing" ) // TestHaveBlock tests the HaveBlock API to ensure proper functionality. diff --git a/checkpoints.go b/checkpoints.go index 0b6dbc2a..6d02d621 100644 --- a/checkpoints.go +++ b/checkpoints.go @@ -6,6 +6,7 @@ package btcchain import ( "fmt" + "github.com/conformal/btcnet" "github.com/conformal/btcscript" "github.com/conformal/btcutil" diff --git a/common_test.go b/common_test.go index eceb51b5..882d6a36 100644 --- a/common_test.go +++ b/common_test.go @@ -6,14 +6,15 @@ package btcchain_test import ( "fmt" + "os" + "path/filepath" + "github.com/conformal/btcchain" "github.com/conformal/btcdb" _ "github.com/conformal/btcdb/ldb" _ "github.com/conformal/btcdb/memdb" "github.com/conformal/btcnet" "github.com/conformal/btcutil" - "os" - "path/filepath" ) // testDbType is the database backend type to use for the tests. diff --git a/difficulty.go b/difficulty.go index 08a110ef..b09c108b 100644 --- a/difficulty.go +++ b/difficulty.go @@ -6,9 +6,10 @@ package btcchain import ( "fmt" - "github.com/conformal/btcwire" "math/big" "time" + + "github.com/conformal/btcwire" ) const ( diff --git a/difficulty_test.go b/difficulty_test.go index b29271f2..19aa278a 100644 --- a/difficulty_test.go +++ b/difficulty_test.go @@ -5,9 +5,10 @@ package btcchain_test import ( - "github.com/conformal/btcchain" "math/big" "testing" + + "github.com/conformal/btcchain" ) func TestBigToCompact(t *testing.T) { diff --git a/error_test.go b/error_test.go index cee2ea06..20f6f58c 100644 --- a/error_test.go +++ b/error_test.go @@ -5,8 +5,9 @@ package btcchain_test import ( - "github.com/conformal/btcchain" "testing" + + "github.com/conformal/btcchain" ) // TestErrorCodeStringer tests the stringized output for the ErrorCode type. diff --git a/internal_test.go b/internal_test.go index 840c0c5e..ac11ca53 100644 --- a/internal_test.go +++ b/internal_test.go @@ -12,8 +12,9 @@ interface. The functions are only exported while the tests are being run. package btcchain import ( - "github.com/conformal/btcutil" "time" + + "github.com/conformal/btcutil" ) // TstSetCoinbaseMaturity makes the ability to set the coinbase maturity diff --git a/log.go b/log.go index 22a60ebd..4998869c 100644 --- a/log.go +++ b/log.go @@ -6,8 +6,9 @@ package btcchain import ( "errors" - "github.com/conformal/btclog" "io" + + "github.com/conformal/btclog" ) // log is a logger that is initialized with no output filters. This diff --git a/merkle.go b/merkle.go index 4bb4dd51..1ac7a5fd 100644 --- a/merkle.go +++ b/merkle.go @@ -5,9 +5,10 @@ package btcchain import ( + "math" + "github.com/conformal/btcutil" "github.com/conformal/btcwire" - "math" ) // nextPowerOfTwo returns the next highest power of two from a given number if diff --git a/merkle_test.go b/merkle_test.go index 01a9af77..fad68b2f 100644 --- a/merkle_test.go +++ b/merkle_test.go @@ -5,9 +5,10 @@ package btcchain_test import ( + "testing" + "github.com/conformal/btcchain" "github.com/conformal/btcutil" - "testing" ) // TestMerkle tests the BuildMerkleTreeStore API. diff --git a/process.go b/process.go index 540701dd..4017a552 100644 --- a/process.go +++ b/process.go @@ -6,6 +6,7 @@ package btcchain import ( "fmt" + "github.com/conformal/btcutil" "github.com/conformal/btcwire" ) diff --git a/reorganization_test.go b/reorganization_test.go index c041ea6f..d6baa87b 100644 --- a/reorganization_test.go +++ b/reorganization_test.go @@ -7,14 +7,15 @@ package btcchain_test import ( "compress/bzip2" "encoding/binary" - "github.com/conformal/btcchain" - "github.com/conformal/btcutil" - "github.com/conformal/btcwire" "io" "os" "path/filepath" "strings" "testing" + + "github.com/conformal/btcchain" + "github.com/conformal/btcutil" + "github.com/conformal/btcwire" ) // TestReorganization loads a set of test blocks which force a chain diff --git a/scriptval.go b/scriptval.go index f931c88f..e958c650 100644 --- a/scriptval.go +++ b/scriptval.go @@ -6,11 +6,12 @@ package btcchain import ( "fmt" + "math" + "runtime" + "github.com/conformal/btcscript" "github.com/conformal/btcutil" "github.com/conformal/btcwire" - "math" - "runtime" ) // txValidateItem holds a transaction along with which input to validate. diff --git a/timesorter_test.go b/timesorter_test.go index bd4b2fe0..db2f9e24 100644 --- a/timesorter_test.go +++ b/timesorter_test.go @@ -5,11 +5,12 @@ package btcchain_test import ( - "github.com/conformal/btcchain" "reflect" "sort" "testing" "time" + + "github.com/conformal/btcchain" ) // TestTimeSorter tests the timeSorter implementation. diff --git a/txlookup.go b/txlookup.go index c969ba7e..fc9c24b7 100644 --- a/txlookup.go +++ b/txlookup.go @@ -6,6 +6,7 @@ package btcchain import ( "fmt" + "github.com/conformal/btcdb" "github.com/conformal/btcutil" "github.com/conformal/btcwire" diff --git a/validate.go b/validate.go index 476448f7..e7a4b659 100644 --- a/validate.go +++ b/validate.go @@ -7,14 +7,15 @@ package btcchain import ( "encoding/binary" "fmt" + "math" + "math/big" + "time" + "github.com/conformal/btcdb" "github.com/conformal/btcnet" "github.com/conformal/btcscript" "github.com/conformal/btcutil" "github.com/conformal/btcwire" - "math" - "math/big" - "time" ) const ( diff --git a/validate_test.go b/validate_test.go index d96c584b..98c75a2f 100644 --- a/validate_test.go +++ b/validate_test.go @@ -5,14 +5,15 @@ package btcchain_test import ( - "github.com/conformal/btcchain" - "github.com/conformal/btcnet" - "github.com/conformal/btcutil" - "github.com/conformal/btcwire" "math" "reflect" "testing" "time" + + "github.com/conformal/btcchain" + "github.com/conformal/btcnet" + "github.com/conformal/btcutil" + "github.com/conformal/btcwire" ) // TestCheckConnectBlock tests the CheckConnectBlock function to ensure it