mirror of
https://github.com/gofiber/storage.git
synced 2025-12-19 00:38:24 +08:00
Added a default value for timeout while opening a boltDB. (#383)
* Added a default value for timeout while opening a boltDB. * Updated the README.md
This commit is contained in:
@@ -64,7 +64,7 @@ type Config struct {
|
||||
// Timeout is the amount of time to wait to obtain a file lock.
|
||||
// Only available on Darwin and Linux.
|
||||
//
|
||||
// Optional. Default is 0 (no timeout)
|
||||
// Optional. Default is 60 * time.Second.
|
||||
Timeout time.Duration
|
||||
|
||||
// Open database in read-only mode.
|
||||
@@ -85,7 +85,7 @@ type Config struct {
|
||||
var ConfigDefault = Config{
|
||||
Database: "fiber.db",
|
||||
Bucket: "fiber_storage",
|
||||
Timeout: 0,
|
||||
Timeout: 60 * time.Second,
|
||||
ReadOnly: false,
|
||||
Reset: false,
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ type Config struct {
|
||||
// Timeout is the amount of time to wait to obtain a file lock.
|
||||
// Only available on Darwin and Linux.
|
||||
//
|
||||
// Optional. Default is 0 (no timeout)
|
||||
// Optional. Default is set to 60 * time.Second.
|
||||
Timeout time.Duration
|
||||
|
||||
// Open database in read-only mode.
|
||||
@@ -35,7 +35,7 @@ type Config struct {
|
||||
var ConfigDefault = Config{
|
||||
Database: "fiber.db",
|
||||
Bucket: "fiber_storage",
|
||||
Timeout: 0,
|
||||
Timeout: 60 * time.Second,
|
||||
ReadOnly: false,
|
||||
Reset: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user