From f56bdca2e6d56240778d8688e580ca385c2becc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 28 Aug 2018 02:22:09 +0200 Subject: [PATCH] coreapi: dht: remove option prefix 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@a288d2c93dd22c48050ffb8cadce259377fd2125 This commit was moved from ipfs/boxo@4390a24ff2b4e85d7c999f3a1066c55bb2fa1cd6 --- core/coreiface/options/dht.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/coreiface/options/dht.go b/core/coreiface/options/dht.go index f989fa5e7..e13e16020 100644 --- a/core/coreiface/options/dht.go +++ b/core/coreiface/options/dht.go @@ -43,18 +43,18 @@ type dhtOpts struct{} var Dht dhtOpts -// WithRecursive is an option for Dht.Provide which specifies whether to provide +// Recursive is an option for Dht.Provide which specifies whether to provide // the given path recursively -func (dhtOpts) WithRecursive(recursive bool) DhtProvideOption { +func (dhtOpts) Recursive(recursive bool) DhtProvideOption { return func(settings *DhtProvideSettings) error { settings.Recursive = recursive return nil } } -// WithNumProviders is an option for Dht.FindProviders which specifies the +// NumProviders is an option for Dht.FindProviders which specifies the // number of peers to look for. Default is 20 -func (dhtOpts) WithNumProviders(numProviders int) DhtFindProvidersOption { +func (dhtOpts) NumProviders(numProviders int) DhtFindProvidersOption { return func(settings *DhtFindProvidersSettings) error { settings.NumProviders = numProviders return nil