refactor!: remove the diff-size cap and its gate.diff-size step
This commit is contained in:
20 files changed
+132
-241
No files matched your search
@@ -13,7 +13,6 @@ import (
|
||||
// without reading the code that applies it.
|
||||
const (
|
||||
defaultPollInterval = 60 * time.Second
|
||||
defaultDiffCapLines = 400
|
||||
defaultWebListen = "127.0.0.1:8484" // "off" disables
|
||||
defaultMaxRetries = 3
|
||||
defaultForgeType = "github"
|
||||
@@ -209,12 +208,6 @@ func (l *Loader) applyGeneralDefaults(cfg *config.Config) {
|
||||
if cfg.PollInterval == 0 {
|
||||
cfg.PollInterval = config.Duration(defaultPollInterval)
|
||||
}
|
||||
// Only an absent key takes the default. An explicit 0 is the documented
|
||||
// way to switch the cap off and must survive.
|
||||
if cfg.DiffCapLines == nil {
|
||||
capLines := defaultDiffCapLines
|
||||
cfg.DiffCapLines = &capLines
|
||||
}
|
||||
if cfg.Web.Listen == "" {
|
||||
cfg.Web.Listen = defaultWebListen
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user