@cryptotaxi247 / kubo / commits / f142bea00

go-ipfs-config: bump repo version, remove support for old config

License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>

Kevin Atkinson committed May 20, 2017 at 00:12 UTC f142bea007fd749624e002561d76476e6ebdf89a
1 file changed +4 -6
config/init.go
+4 -6
@@ -21,10 +21,7 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) {
21 return nil, err
22 }
23
24 - datastore, err := datastoreConfig()
25 - if err != nil {
26 - return nil, err
27 - }
24 + datastore := DefaultDatastoreConfig()
25
26 conf := &Config{
27
@@ -79,7 +76,8 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) {
76 return conf, nil
77 }
78
82 -func datastoreConfig() (*Datastore, error) {
79 +// DatastoreConfig is an internal function exported to aid in testing.
80 +func DefaultDatastoreConfig() *Datastore {
81 return &Datastore{
82 StorageMax: "10GB",
83 StorageGCWatermark: 90, // 90%
@@ -111,7 +109,7 @@ func datastoreConfig() (*Datastore, error) {
109 },
110 },
111 },
114 - }, nil
112 + }
113 }
114
115 // identityConfig initializes a new identity.