From cb79396b3531b910737e28a6e4bd4bc35a4ffdeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 2 Feb 2018 22:36:01 +0100 Subject: [PATCH] commands: switch object commands to CoreAPI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera This commit was moved from ipfs/interface-go-ipfs-core@9fe2a845730cb243ba72ceb3a1be7871467b416b This commit was moved from ipfs/boxo@157bb70fa94828c5c37466e6cc75e2058454ed2c --- core/coreiface/object.go | 5 ++--- core/coreiface/options/object.go | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/coreiface/object.go b/core/coreiface/object.go index 0a716dc97..1c7caeb77 100644 --- a/core/coreiface/object.go +++ b/core/coreiface/object.go @@ -31,7 +31,6 @@ type ObjectStat struct { CumulativeSize int } - const ( // DiffAdd is a Type of ObjectChange where a link was added to the graph DiffAdd = iota @@ -57,11 +56,11 @@ type ObjectChange struct { // Before holds the link path before the change. Note that when a link is // added, this will be nil. - Before Path + Before ResolvedPath // After holds the link path after the change. Note that when a link is // removed, this will be nil. - After Path + After ResolvedPath } // ObjectAPI specifies the interface to MerkleDAG and contains useful utilities diff --git a/core/coreiface/options/object.go b/core/coreiface/options/object.go index 9257ea607..e484a9f36 100644 --- a/core/coreiface/options/object.go +++ b/core/coreiface/options/object.go @@ -105,9 +105,9 @@ func (objectOpts) DataType(t string) ObjectPutOption { } } -// WithPin is an option for Object.Put which specifies whether to pin the added +// Pin is an option for Object.Put which specifies whether to pin the added // objects, default is false -func (objectOpts) WithPin(pin bool) ObjectPutOption { +func (objectOpts) Pin(pin bool) ObjectPutOption { return func(settings *ObjectPutSettings) error { settings.Pin = pin return nil