From 5b64e08c936a6a1755d72798211c0b4e3e201b66 Mon Sep 17 00:00:00 2001 From: Jin Liu Date: Mon, 4 Nov 2019 17:35:24 -0800 Subject: [PATCH 1/2] Fix make doesn't build src files and build error --- Makefile | 6 ++++++ ledger/ledger.go | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7d2cd1f..6b88dec 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ default: lintf +SRC_DIR=./info ./ledger + install: brew install protobuf brew install prototool @@ -11,3 +13,7 @@ lintf: build: prototool all go mod tidy + for dir in $(SRC_DIR); \ + do \ + eval go build $$dir; \ + done diff --git a/ledger/ledger.go b/ledger/ledger.go index 064d3ee..c1676ec 100644 --- a/ledger/ledger.go +++ b/ledger/ledger.go @@ -5,7 +5,6 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "os" "time" ledgerPb "github.com/tron-us/go-btfs-common/protos/ledger" @@ -131,7 +130,7 @@ func CreateChannel(ctx context.Context, ledgerClient ledgerPb.ChannelsClient, ch } func CloseChannel(ctx context.Context, ledgerClient ledgerPb.ChannelsClient, signedChannelState *ledgerPb.SignedChannelState) error { - _, err = ledgerClient.CloseChannel(ctx, signedChannelState) + _, err := ledgerClient.CloseChannel(ctx, signedChannelState) if err != nil { return err } From 07d0888ce13f95950c28fe3c7c75d1ed1459c470 Mon Sep 17 00:00:00 2001 From: Jin Liu Date: Tue, 5 Nov 2019 13:04:53 -0800 Subject: [PATCH 2/2] remove eval in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b88dec..45ddd9b 100644 --- a/Makefile +++ b/Makefile @@ -15,5 +15,5 @@ build: go mod tidy for dir in $(SRC_DIR); \ do \ - eval go build $$dir; \ + go build $$dir; \ done