From d7a1220589d9e516524318594c57fccb682e5e25 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Thu, 6 Sep 2018 07:50:35 -0400 Subject: [PATCH 1/2] gx update go-cid and fix code to use new Cid type --- key.go | 6 +++--- package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/key.go b/key.go index b4ee674..b4fff98 100644 --- a/key.go +++ b/key.go @@ -22,15 +22,15 @@ func BinaryFromDsKey(k datastore.Key) ([]byte, error) { } // CidToDsKey creates a Key from the given Cid. -func CidToDsKey(k *cid.Cid) datastore.Key { +func CidToDsKey(k cid.Cid) datastore.Key { return NewKeyFromBinary(k.Bytes()) } // DsKeyToCid converts the given Key to its corresponding Cid. -func DsKeyToCid(dsKey datastore.Key) (*cid.Cid, error) { +func DsKeyToCid(dsKey datastore.Key) (cid.Cid, error) { kb, err := BinaryFromDsKey(dsKey) if err != nil { - return nil, err + return cid.Cid{}, err } return cid.Cast(kb) } diff --git a/package.json b/package.json index 98a8b3c..4fdc962 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ }, { "author": "whyrusleeping", - "hash": "QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb", + "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", "name": "go-cid", - "version": "0.8.0" + "version": "0.9.0" }, { "author": "whyrusleeping", From d81f0a2b3aae5a4cc7e9058a0c6e2024121f85e6 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Tue, 11 Sep 2018 22:06:26 -0400 Subject: [PATCH 2/2] gx publish 0.1.0 --- .gx/lastpubver | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gx/lastpubver b/.gx/lastpubver index ce1872e..15c9ca8 100644 --- a/.gx/lastpubver +++ b/.gx/lastpubver @@ -1 +1 @@ -0.0.10: Qmf1xGr3SyBpiPp3ZDuKkYMh4gnRk9K4QnbL17kstnf35h +0.1.0: QmXejiSr776HgKLEGSs7unW7GT82AgfMbQX5crfSybGU8b diff --git a/package.json b/package.json index 4fdc962..346087a 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,6 @@ "license": "", "name": "go-ipfs-ds-help", "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.0.10" + "version": "0.1.0" }