Skip to content

Commit

Permalink
fix fmt and vetting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
simskij committed Oct 3, 2020
1 parent ca292a1 commit a7a28ec
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (
timeout time.Duration
lifecycleHooks bool
rollingRestart bool
scope string
scope string
)

var rootCmd = &cobra.Command{
Expand Down
1 change: 0 additions & 1 deletion pkg/container/mocks/FilterableContainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ func (_m *FilterableContainer) Scope() (string, bool) {

return r0, r1
}

2 changes: 1 addition & 1 deletion pkg/filters/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func FilterByScope(scope string, baseFilter t.Filter) t.Filter {
if scope == "" {
return baseFilter
}

return func(c t.FilterableContainer) bool {
containerScope, ok := c.Scope()
if ok && containerScope == scope {
Expand Down
2 changes: 1 addition & 1 deletion pkg/notifications/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ func (e *emailTypeNotifier) Fire(entry *log.Entry) error {
return nil
}

func (e *emailTypeNotifier) Close() {}
func (e *emailTypeNotifier) Close() {}
4 changes: 2 additions & 2 deletions pkg/notifications/shoutrrr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"fmt"
"github.com/containrrr/shoutrrr/pkg/types"
"strings"
"text/template"
"strings"

"github.com/containrrr/shoutrrr"
t "github.com/containrrr/watchtower/pkg/types"
Expand Down Expand Up @@ -136,7 +136,7 @@ func getShoutrrrTemplate(c *cobra.Command) *template.Template {
funcs := template.FuncMap{
"ToUpper": strings.ToUpper,
"ToLower": strings.ToLower,
"Title": strings.Title,
"Title": strings.Title,
}

// If we succeed in getting a non-empty template configuration
Expand Down
1 change: 0 additions & 1 deletion pkg/notifications/shoutrrr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func TestShoutrrrStringFunctions(t *testing.T) {
require.Equal(t, "INFO: foo bar Foo Bar\n", s)
}


func TestShoutrrrInvalidTemplateUsesTemplate(t *testing.T) {
cmd := new(cobra.Command)

Expand Down

0 comments on commit a7a28ec

Please sign in to comment.