mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 23:20:12 +01:00
fix linting errors
This commit is contained in:
parent
c305ee385c
commit
859fd0c1c8
3 changed files with 64 additions and 15 deletions
|
|
@ -1,34 +1,34 @@
|
||||||
package flags
|
package flags
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WatchConfig is the global watchtower configuration created from flags and environment variables
|
// WatchConfig is the global watchtower configuration created from flags and environment variables
|
||||||
type WatchConfig struct {
|
type WatchConfig struct {
|
||||||
Interval int
|
Interval int
|
||||||
Schedule string
|
Schedule string
|
||||||
NoPull bool `mapstructure:"no-pull"`
|
NoPull bool `mapstructure:"no-pull"`
|
||||||
NoRestart bool `mapstructure:"no-restart"`
|
NoRestart bool `mapstructure:"no-restart"`
|
||||||
NoStartupMessage bool `mapstructure:"no-startup-message"`
|
NoStartupMessage bool `mapstructure:"no-startup-message"`
|
||||||
Cleanup bool
|
Cleanup bool
|
||||||
RemoveVolumes bool `mapstructure:"remove-volumes"`
|
RemoveVolumes bool `mapstructure:"remove-volumes"`
|
||||||
EnableLabel bool `mapstructure:"label-enable"`
|
EnableLabel bool `mapstructure:"label-enable"`
|
||||||
Debug bool
|
Debug bool
|
||||||
Trace bool
|
Trace bool
|
||||||
MonitorOnly bool `mapstructure:"monitor-only"`
|
MonitorOnly bool `mapstructure:"monitor-only"`
|
||||||
RunOnce bool `mapstructure:"run-once"`
|
RunOnce bool `mapstructure:"run-once"`
|
||||||
IncludeStopped bool `mapstructure:"include-stopped"`
|
IncludeStopped bool `mapstructure:"include-stopped"`
|
||||||
IncludeRestarting bool `mapstructure:"include-restarting"`
|
IncludeRestarting bool `mapstructure:"include-restarting"`
|
||||||
ReviveStopped bool `mapstructure:"revive-stopped"`
|
ReviveStopped bool `mapstructure:"revive-stopped"`
|
||||||
LifecycleHooks bool `mapstructure:"enable-lifecycle-hooks"`
|
LifecycleHooks bool `mapstructure:"enable-lifecycle-hooks"`
|
||||||
RollingRestart bool `mapstructure:"rolling-restart"`
|
RollingRestart bool `mapstructure:"rolling-restart"`
|
||||||
HTTPAPIToken string `mapstructure:"http-api-token"`
|
HTTPAPIToken string `mapstructure:"http-api-token"`
|
||||||
Timeout Duration `mapstructure:"stop-timeout"`
|
|
||||||
Scope string
|
Scope string
|
||||||
EnableUpdateAPI bool `mapstructure:"http-api-update"`
|
EnableUpdateAPI bool `mapstructure:"http-api-update"`
|
||||||
EnableMetricsAPI bool `mapstructure:"http-api-metrics"`
|
EnableMetricsAPI bool `mapstructure:"http-api-metrics"`
|
||||||
UpdateAPIWithScheduler bool `mapstructure:"http-api-periodic-polls"`
|
UpdateAPIWithScheduler bool `mapstructure:"http-api-periodic-polls"`
|
||||||
WarnOnHeadFailed string `mapstructure:"warn-on-head-failure"`
|
WarnOnHeadFailed string `mapstructure:"warn-on-head-failure"`
|
||||||
NoColor bool `mapstructure:"no-color"`
|
NoColor bool `mapstructure:"no-color"`
|
||||||
|
Timeout time.Duration `mapstructure:"stop-timeout"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
47
internal/flags/flags.coverprofile
Normal file
47
internal/flags/flags.coverprofile
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
mode: atomic
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:20.50,25.2 4 3
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:28.50,170.2 25 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:173.56,328.2 27 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:331.20,343.2 11 5
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:347.42,355.53 6 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:358.2,358.55 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:361.2,361.63 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:364.2,364.57 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:367.2,367.63 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:370.2,370.67 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:373.2,373.12 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:355.53,357.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:358.55,360.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:361.63,363.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:364.57,366.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:367.63,369.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:370.67,372.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:377.70,386.57 7 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:389.2,389.62 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:392.2,392.66 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:395.2,395.66 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:399.2,399.49 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:386.57,388.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:389.62,391.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:392.66,394.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:395.66,397.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:402.49,403.40 1 5
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:406.2,407.16 2 5
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:410.2,410.12 1 5
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:403.40,405.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:407.16,409.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:413.48,414.9 1 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:417.2,417.12 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:414.9,416.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:422.50,431.33 3 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:431.33,433.3 1 8
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:437.61,439.16 2 8
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:442.2,442.34 1 8
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:439.16,441.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:442.34,444.17 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:447.3,448.17 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:444.17,446.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:448.17,450.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:454.28,456.24 2 2
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:459.2,459.13 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:456.24,458.3 1 1
|
||||||
|
|
@ -15,6 +15,8 @@ import (
|
||||||
// DockerAPIMinVersion is the minimum version of the docker api required to
|
// DockerAPIMinVersion is the minimum version of the docker api required to
|
||||||
// use watchtower
|
// use watchtower
|
||||||
const DockerAPIMinVersion string = "1.25"
|
const DockerAPIMinVersion string = "1.25"
|
||||||
|
|
||||||
|
// DefaultInterval is the default time between the start of update checks
|
||||||
const DefaultInterval = int(time.Hour * 24 / time.Second)
|
const DefaultInterval = int(time.Hour * 24 / time.Second)
|
||||||
|
|
||||||
// RegisterDockerFlags that are used directly by the docker api client
|
// RegisterDockerFlags that are used directly by the docker api client
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue