mirror of
https://github.com/containrrr/watchtower.git
synced 2026-03-11 07:02:35 +01:00
Consolidated all post-fork updates including dependency bumps and workflow changes
This commit is contained in:
parent
2abaa47fd3
commit
6b62d53797
100 changed files with 1503 additions and 1264 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/containrrr/watchtower/pkg/types"
|
||||
"github.com/nicholas-fedor/watchtower/pkg/types"
|
||||
)
|
||||
|
||||
type previewData struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package data
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/containrrr/watchtower/pkg/types"
|
||||
"github.com/nicholas-fedor/watchtower/pkg/types"
|
||||
)
|
||||
|
||||
// State is the outcome of a container in a session report
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package data
|
||||
|
||||
import wt "github.com/containrrr/watchtower/pkg/types"
|
||||
import wt "github.com/nicholas-fedor/watchtower/pkg/types"
|
||||
|
||||
type containerStatus struct {
|
||||
containerID wt.ContainerID
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/containrrr/watchtower/pkg/notifications/preview/data"
|
||||
"github.com/containrrr/watchtower/pkg/notifications/templates"
|
||||
"github.com/nicholas-fedor/watchtower/pkg/notifications/preview/data"
|
||||
"github.com/nicholas-fedor/watchtower/pkg/notifications/templates"
|
||||
)
|
||||
|
||||
func Render(input string, states []data.State, loglevels []data.LogLevel) (string, error) {
|
||||
|
|
@ -15,7 +15,7 @@ func Render(input string, states []data.State, loglevels []data.LogLevel) (strin
|
|||
|
||||
tpl, err := template.New("").Funcs(templates.Funcs).Parse(input)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to parse template: %e", err)
|
||||
return "", fmt.Errorf("failed to parse %v", err)
|
||||
}
|
||||
|
||||
for _, state := range states {
|
||||
|
|
@ -29,7 +29,7 @@ func Render(input string, states []data.State, loglevels []data.LogLevel) (strin
|
|||
var buf strings.Builder
|
||||
err = tpl.Execute(&buf, data)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to execute template: %e", err)
|
||||
return "", fmt.Errorf("failed to execute template: %v", err)
|
||||
}
|
||||
|
||||
return buf.String(), nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue