mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
gofmt -s -w .
This commit is contained in:
parent
083903f617
commit
d00305cb25
4 changed files with 12 additions and 12 deletions
|
|
@ -4,12 +4,12 @@ import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"github.com/kopfkrieg/watchtower/container"
|
"github.com/kopfkrieg/watchtower/container"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
||||||
)
|
)
|
||||||
|
|
||||||
// Update looks at the running Docker containers to see if any of the images
|
// Update looks at the running Docker containers to see if any of the images
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package container
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
"github.com/kopfkrieg/watchtower/container/mocks"
|
"github.com/kopfkrieg/watchtower/container/mocks"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWatchtowerContainersFilter(t *testing.T) {
|
func TestWatchtowerContainersFilter(t *testing.T) {
|
||||||
|
|
|
||||||
16
main.go
16
main.go
|
|
@ -8,12 +8,12 @@ import (
|
||||||
|
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/robfig/cron"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"github.com/urfave/cli"
|
|
||||||
"github.com/kopfkrieg/watchtower/actions"
|
"github.com/kopfkrieg/watchtower/actions"
|
||||||
"github.com/kopfkrieg/watchtower/container"
|
"github.com/kopfkrieg/watchtower/container"
|
||||||
"github.com/kopfkrieg/watchtower/notifications"
|
"github.com/kopfkrieg/watchtower/notifications"
|
||||||
|
"github.com/robfig/cron"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DockerAPIMinVersion is the version of the docker API, which is minimally required by
|
// DockerAPIMinVersion is the version of the docker API, which is minimally required by
|
||||||
|
|
@ -31,7 +31,7 @@ var (
|
||||||
noRestart bool
|
noRestart bool
|
||||||
enableLabel bool
|
enableLabel bool
|
||||||
notifier *notifications.Notifier
|
notifier *notifications.Notifier
|
||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
@ -84,10 +84,10 @@ func main() {
|
||||||
EnvVar: "DOCKER_TLS_VERIFY",
|
EnvVar: "DOCKER_TLS_VERIFY",
|
||||||
},
|
},
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "stop-timeout",
|
Name: "stop-timeout",
|
||||||
Usage: "timeout before container is forcefully stopped",
|
Usage: "timeout before container is forcefully stopped",
|
||||||
Value: time.Second * 10,
|
Value: time.Second * 10,
|
||||||
EnvVar: "WATCHTOWER_TIMEOUT",
|
EnvVar: "WATCHTOWER_TIMEOUT",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "label-enable",
|
Name: "label-enable",
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
t := time.Now()
|
t := time.Now()
|
||||||
|
|
||||||
header := make(map[string]string)
|
header := make(map[string]string)
|
||||||
header["From"] = e.From
|
header["From"] = e.From
|
||||||
header["To"] = e.To
|
header["To"] = e.To
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue