Skip to content

Commit

Permalink
removes unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Dec 13, 2024
1 parent 74b5ada commit 9a73d18
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions internal/docker/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package docker
import (
"fmt"
"math"
"strings"
"time"

"github.com/amir20/dozzle/internal/utils"
Expand Down Expand Up @@ -45,21 +44,6 @@ type ContainerEvent struct {

type ContainerFilter map[string][]string

func NewContainerFilter(values map[string]string) (ContainerFilter, error) {
containerFilter := make(ContainerFilter)
for _, filter := range values {
pos := strings.Index(filter, "=")
if pos == -1 {
return nil, fmt.Errorf("invalid filter: %s. each filter should be of the form key=value", filter)
}
key := filter[:pos]
val := filter[pos+1:]
containerFilter[key] = append(containerFilter[key], val)
}

return containerFilter, nil
}

func (f ContainerFilter) asArgs() filters.Args {
filterArgs := filters.NewArgs()
for key, values := range f {
Expand Down

0 comments on commit 9a73d18

Please sign in to comment.