You've already forked watchtower
							
							
				mirror of
				https://github.com/containrrr/watchtower.git
				synced 2025-10-31 00:17:44 +02:00 
			
		
		
		
	fix fmt and vetting issues
This commit is contained in:
		| @@ -31,7 +31,7 @@ var ( | |||||||
| 	timeout        time.Duration | 	timeout        time.Duration | ||||||
| 	lifecycleHooks bool | 	lifecycleHooks bool | ||||||
| 	rollingRestart bool | 	rollingRestart bool | ||||||
| 	scope	         string | 	scope          string | ||||||
| ) | ) | ||||||
|  |  | ||||||
| var rootCmd = &cobra.Command{ | var rootCmd = &cobra.Command{ | ||||||
|   | |||||||
| @@ -78,4 +78,3 @@ func (_m *FilterableContainer) Scope() (string, bool) { | |||||||
|  |  | ||||||
| 	return r0, r1 | 	return r0, r1 | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -56,7 +56,7 @@ func FilterByScope(scope string, baseFilter t.Filter) t.Filter { | |||||||
| 	if scope == "" { | 	if scope == "" { | ||||||
| 		return baseFilter | 		return baseFilter | ||||||
| 	} | 	} | ||||||
| 	 |  | ||||||
| 	return func(c t.FilterableContainer) bool { | 	return func(c t.FilterableContainer) bool { | ||||||
| 		containerScope, ok := c.Scope() | 		containerScope, ok := c.Scope() | ||||||
| 		if ok && containerScope == scope { | 		if ok && containerScope == scope { | ||||||
|   | |||||||
| @@ -154,4 +154,4 @@ func (e *emailTypeNotifier) Fire(entry *log.Entry) error { | |||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (e *emailTypeNotifier) Close() {} | func (e *emailTypeNotifier) Close() {} | ||||||
|   | |||||||
| @@ -4,8 +4,8 @@ import ( | |||||||
| 	"bytes" | 	"bytes" | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"github.com/containrrr/shoutrrr/pkg/types" | 	"github.com/containrrr/shoutrrr/pkg/types" | ||||||
|  | 	"strings" | ||||||
| 	"text/template" | 	"text/template" | ||||||
|     "strings" |  | ||||||
|  |  | ||||||
| 	"github.com/containrrr/shoutrrr" | 	"github.com/containrrr/shoutrrr" | ||||||
| 	t "github.com/containrrr/watchtower/pkg/types" | 	t "github.com/containrrr/watchtower/pkg/types" | ||||||
| @@ -136,7 +136,7 @@ func getShoutrrrTemplate(c *cobra.Command) *template.Template { | |||||||
| 	funcs := template.FuncMap{ | 	funcs := template.FuncMap{ | ||||||
| 		"ToUpper": strings.ToUpper, | 		"ToUpper": strings.ToUpper, | ||||||
| 		"ToLower": strings.ToLower, | 		"ToLower": strings.ToLower, | ||||||
| 		"Title": strings.Title, | 		"Title":   strings.Title, | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// If we succeed in getting a non-empty template configuration | 	// If we succeed in getting a non-empty template configuration | ||||||
|   | |||||||
| @@ -75,7 +75,6 @@ func TestShoutrrrStringFunctions(t *testing.T) { | |||||||
| 	require.Equal(t, "INFO: foo bar Foo Bar\n", s) | 	require.Equal(t, "INFO: foo bar Foo Bar\n", s) | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| func TestShoutrrrInvalidTemplateUsesTemplate(t *testing.T) { | func TestShoutrrrInvalidTemplateUsesTemplate(t *testing.T) { | ||||||
| 	cmd := new(cobra.Command) | 	cmd := new(cobra.Command) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user