@cryptotaxi247 / kubo / commits / f56bdca2e

coreapi: dht: remove option prefix

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@a288d2c93dd22c48050ffb8cadce259377fd2125 This commit was moved from ipfs/boxo@4390a24ff2b4e85d7c999f3a1066c55bb2fa1cd6

Łukasz Magiera committed Aug 28, 2018 at 02:22 UTC f56bdca2e6d56240778d8688e580ca385c2becc1
1 file changed +4 -4
core/coreiface/options/dht.go
+4 -4
@@ -43,18 +43,18 @@ type dhtOpts struct{}
43
44 var Dht dhtOpts
45
46 -// WithRecursive is an option for Dht.Provide which specifies whether to provide
46 +// Recursive is an option for Dht.Provide which specifies whether to provide
47 // the given path recursively
48 -func (dhtOpts) WithRecursive(recursive bool) DhtProvideOption {
48 +func (dhtOpts) Recursive(recursive bool) DhtProvideOption {
49 return func(settings *DhtProvideSettings) error {
50 settings.Recursive = recursive
51 return nil
52 }
53 }
54
55 -// WithNumProviders is an option for Dht.FindProviders which specifies the
55 +// NumProviders is an option for Dht.FindProviders which specifies the
56 // number of peers to look for. Default is 20
57 -func (dhtOpts) WithNumProviders(numProviders int) DhtFindProvidersOption {
57 +func (dhtOpts) NumProviders(numProviders int) DhtFindProvidersOption {
58 return func(settings *DhtFindProvidersSettings) error {
59 settings.NumProviders = numProviders
60 return nil