From 4f7c22caa689d2cd148bf4e3b9a802be67977dba Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Mon, 12 Dec 2016 17:20:56 +0800 Subject: [PATCH] Move flogging pkg into the peer pkg The flogging pkg is only utilized by peer and core module with single source-code file. It will keep the structure more tight to move the pkg under the core pkg. Change-Id: Id47cc1315f845dba625ed0fc61873a41250ff99d Signed-off-by: Baohua Yang --- core/admin.go | 2 +- core/chaincode/chaincode_support.go | 2 +- core/errors/errors.go | 2 +- core/errors/errors_test.go | 2 +- {flogging => core/flogging}/logging.go | 0 {flogging => core/flogging}/logging_test.go | 2 +- peer/common/common.go | 2 +- peer/main.go | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename {flogging => core/flogging}/logging.go (100%) rename {flogging => core/flogging}/logging_test.go (99%) diff --git a/core/admin.go b/core/admin.go index 6ee81e2dad7..9b517d8b8eb 100644 --- a/core/admin.go +++ b/core/admin.go @@ -25,7 +25,7 @@ import ( "golang.org/x/net/context" "github.com/golang/protobuf/ptypes/empty" - "github.com/hyperledger/fabric/flogging" + "github.com/hyperledger/fabric/core/flogging" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/chaincode_support.go b/core/chaincode/chaincode_support.go index 6306c0f52c3..10896f5c605 100644 --- a/core/chaincode/chaincode_support.go +++ b/core/chaincode/chaincode_support.go @@ -33,8 +33,8 @@ import ( "github.com/hyperledger/fabric/core/container" "github.com/hyperledger/fabric/core/container/ccintf" + "github.com/hyperledger/fabric/core/flogging" "github.com/hyperledger/fabric/core/ledger" - "github.com/hyperledger/fabric/flogging" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/errors/errors.go b/core/errors/errors.go index 69d901c9fb0..c67dce14d81 100644 --- a/core/errors/errors.go +++ b/core/errors/errors.go @@ -22,7 +22,7 @@ import ( "fmt" "runtime" - "github.com/hyperledger/fabric/flogging" + "github.com/hyperledger/fabric/core/flogging" logging "github.com/op/go-logging" ) diff --git a/core/errors/errors_test.go b/core/errors/errors_test.go index 03fde840ea8..9ce337e858a 100644 --- a/core/errors/errors_test.go +++ b/core/errors/errors_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "github.com/hyperledger/fabric/flogging" + "github.com/hyperledger/fabric/core/flogging" ) func TestError(t *testing.T) { diff --git a/flogging/logging.go b/core/flogging/logging.go similarity index 100% rename from flogging/logging.go rename to core/flogging/logging.go diff --git a/flogging/logging_test.go b/core/flogging/logging_test.go similarity index 99% rename from flogging/logging_test.go rename to core/flogging/logging_test.go index 5587a322ac9..b913deec462 100644 --- a/flogging/logging_test.go +++ b/core/flogging/logging_test.go @@ -19,7 +19,7 @@ package flogging_test import ( "testing" - "github.com/hyperledger/fabric/flogging" + "github.com/hyperledger/fabric/core/flogging" "github.com/op/go-logging" "github.com/spf13/viper" ) diff --git a/peer/common/common.go b/peer/common/common.go index 702397e05b6..1f693bf923b 100755 --- a/peer/common/common.go +++ b/peer/common/common.go @@ -20,9 +20,9 @@ import ( "fmt" "github.com/hyperledger/fabric/core/errors" + "github.com/hyperledger/fabric/core/flogging" "github.com/hyperledger/fabric/core/peer" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/flogging" "github.com/hyperledger/fabric/msp" pb "github.com/hyperledger/fabric/protos/peer" "github.com/spf13/viper" diff --git a/peer/main.go b/peer/main.go index be9cfdd6b4e..8b53aa9aca6 100644 --- a/peer/main.go +++ b/peer/main.go @@ -31,8 +31,8 @@ import ( "github.com/hyperledger/fabric/core" "github.com/hyperledger/fabric/core/crypto/primitives" + "github.com/hyperledger/fabric/core/flogging" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/flogging" "github.com/hyperledger/fabric/peer/chaincode" "github.com/hyperledger/fabric/peer/clilogging" "github.com/hyperledger/fabric/peer/node"