mirror of
https://github.com/gofiber/storage.git
synced 2025-10-01 06:42:18 +08:00
🦴 update skeleton
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
package postgres
|
||||
|
||||
import "time"
|
||||
|
||||
// Config defines the config for storage.
|
||||
type Config struct {
|
||||
GCInterval time.Duration
|
||||
}
|
||||
|
||||
// ConfigDefault is the default config
|
||||
var ConfigDefault = Config{}
|
||||
var ConfigDefault = Config{
|
||||
GCInterval: 10 * time.Second,
|
||||
}
|
||||
|
||||
// Helper function to set default values
|
||||
func configDefault(cfg Config) Config {
|
||||
if int(cfg.GCInterval) == 0 {
|
||||
cfg.GCInterval = ConfigDefault.GCInterval
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
Reference in New Issue
Block a user