Skip to content

Commit

Permalink
Merge pull request #40 from Fenny/main
Browse files Browse the repository at this point in the history
🩹 fix duration check
  • Loading branch information
Fenny committed Nov 14, 2020
2 parents 366ce02 + deb10fb commit 5262166
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion badger/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func configDefault(config ...Config) Config {
if cfg.Database == "" {
cfg.Database = ConfigDefault.Database
}
if int(cfg.GCInterval) == 0 {
if int(cfg.GCInterval.Seconds()) <= 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
Expand Down
2 changes: 1 addition & 1 deletion memory/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func configDefault(config ...Config) Config {
cfg := config[0]

// Set default values
if int(cfg.GCInterval) == 0 {
if int(cfg.GCInterval.Seconds()) <= 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
Expand Down
2 changes: 1 addition & 1 deletion mysql/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func configDefault(config ...Config) Config {
if cfg.Table == "" {
cfg.Table = ConfigDefault.Table
}
if int(cfg.GCInterval) == 0 {
if int(cfg.GCInterval.Seconds()) <= 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
Expand Down
2 changes: 1 addition & 1 deletion postgres/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func configDefault(config ...Config) Config {
if cfg.Table == "" {
cfg.Table = ConfigDefault.Table
}
if int(cfg.GCInterval) == 0 {
if int(cfg.GCInterval.Seconds()) <= 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
Expand Down
2 changes: 1 addition & 1 deletion sqlite3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func configDefault(config ...Config) Config {
if cfg.Table == "" {
cfg.Table = ConfigDefault.Table
}
if int(cfg.GCInterval) == 0 {
if int(cfg.GCInterval.Seconds()) <= 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
Expand Down

0 comments on commit 5262166

Please sign in to comment.