From eca3c604c89337334ee2e69b04d657bb367f629a Mon Sep 17 00:00:00 2001 From: Wei Yang Date: Sun, 22 Oct 2017 10:13:25 +0800 Subject: [PATCH] make it a package --- base58.go | 2 +- base58_test.go | 2 +- block.go | 2 +- blockchain.go | 2 +- blockchain_iterator.go | 2 +- cli.go | 2 +- cli_createblockchain.go | 2 +- cli_createwallet.go | 2 +- cli_explore.go | 2 +- cli_getbalance.go | 2 +- cli_listaddress.go | 2 +- cli_printchain.go | 2 +- cli_reindexutxo.go | 2 +- cli_send.go | 2 +- cli_startnode.go | 2 +- main.go | 6 ------ merkle_tree.go | 2 +- merkle_tree_test.go | 2 +- proofofwork.go | 2 +- server.go | 2 +- transaction.go | 2 +- transaction_input.go | 2 +- transaction_output.go | 2 +- utils.go | 2 +- utxo_set.go | 2 +- wallet.go | 2 +- wallets.go | 2 +- 27 files changed, 26 insertions(+), 32 deletions(-) delete mode 100644 main.go diff --git a/base58.go b/base58.go index 60b01e8e..630065b3 100644 --- a/base58.go +++ b/base58.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/base58_test.go b/base58_test.go index 5221340e..0629fff9 100644 --- a/base58_test.go +++ b/base58_test.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "testing" diff --git a/block.go b/block.go index e403e549..8094229a 100644 --- a/block.go +++ b/block.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/blockchain.go b/blockchain.go index 535a1309..10abe98a 100644 --- a/blockchain.go +++ b/blockchain.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/blockchain_iterator.go b/blockchain_iterator.go index 305311d9..95ff910d 100644 --- a/blockchain_iterator.go +++ b/blockchain_iterator.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "log" diff --git a/cli.go b/cli.go index e0f17a70..9a355f03 100644 --- a/cli.go +++ b/cli.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "flag" diff --git a/cli_createblockchain.go b/cli_createblockchain.go index 7e69405c..35eaf312 100644 --- a/cli_createblockchain.go +++ b/cli_createblockchain.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "fmt" diff --git a/cli_createwallet.go b/cli_createwallet.go index 0e05f202..4fd3021e 100644 --- a/cli_createwallet.go +++ b/cli_createwallet.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import "fmt" diff --git a/cli_explore.go b/cli_explore.go index 28494af5..938d6d3b 100644 --- a/cli_explore.go +++ b/cli_explore.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "crypto/elliptic" diff --git a/cli_getbalance.go b/cli_getbalance.go index a86e3dc1..fc4d2dfd 100644 --- a/cli_getbalance.go +++ b/cli_getbalance.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "fmt" diff --git a/cli_listaddress.go b/cli_listaddress.go index 0d30563d..3149c575 100644 --- a/cli_listaddress.go +++ b/cli_listaddress.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "fmt" diff --git a/cli_printchain.go b/cli_printchain.go index 49c4deb1..acc90a08 100644 --- a/cli_printchain.go +++ b/cli_printchain.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "fmt" diff --git a/cli_reindexutxo.go b/cli_reindexutxo.go index 87db3245..47d8cdc4 100644 --- a/cli_reindexutxo.go +++ b/cli_reindexutxo.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import "fmt" diff --git a/cli_send.go b/cli_send.go index 67b0091e..c235600e 100644 --- a/cli_send.go +++ b/cli_send.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "fmt" diff --git a/cli_startnode.go b/cli_startnode.go index d390512e..89457d5f 100644 --- a/cli_startnode.go +++ b/cli_startnode.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "fmt" diff --git a/main.go b/main.go deleted file mode 100644 index a48ad8e5..00000000 --- a/main.go +++ /dev/null @@ -1,6 +0,0 @@ -package main - -func main() { - cli := CLI{} - cli.Run() -} diff --git a/merkle_tree.go b/merkle_tree.go index 0b7deb6c..48ec6a8b 100644 --- a/merkle_tree.go +++ b/merkle_tree.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "crypto/sha256" diff --git a/merkle_tree_test.go b/merkle_tree_test.go index d104ceee..b60246ee 100644 --- a/merkle_tree_test.go +++ b/merkle_tree_test.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "encoding/hex" diff --git a/proofofwork.go b/proofofwork.go index 967a4bc1..33c67455 100644 --- a/proofofwork.go +++ b/proofofwork.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/server.go b/server.go index 0058cd0c..468a6cc3 100644 --- a/server.go +++ b/server.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/transaction.go b/transaction.go index f3fc0973..90b61023 100644 --- a/transaction.go +++ b/transaction.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/transaction_input.go b/transaction_input.go index 23beeba5..877e2607 100644 --- a/transaction_input.go +++ b/transaction_input.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import "bytes" diff --git a/transaction_output.go b/transaction_output.go index deb49cdb..0ec0cb79 100644 --- a/transaction_output.go +++ b/transaction_output.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/utils.go b/utils.go index aecf9192..1d3fbe08 100644 --- a/utils.go +++ b/utils.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/utxo_set.go b/utxo_set.go index 180ce04b..6a422f59 100644 --- a/utxo_set.go +++ b/utxo_set.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "encoding/hex" diff --git a/wallet.go b/wallet.go index 506b5444..508b3046 100644 --- a/wallet.go +++ b/wallet.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes" diff --git a/wallets.go b/wallets.go index a7d354f4..51dbce46 100644 --- a/wallets.go +++ b/wallets.go @@ -1,4 +1,4 @@ -package main +package blockchain_go import ( "bytes"