Skip to content

Commit

Permalink
daemon/list: Drop unused arg from containerReducer
Browse files Browse the repository at this point in the history
refreshImage is the only function used as a reducer and it doesn't use
the `filter *listContext`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 13180c1)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
  • Loading branch information
vvoland committed Jul 28, 2023
1 parent 6c4121a commit 45ba926
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/list.go
Expand Up @@ -41,7 +41,7 @@ type iterationAction int

// containerReducer represents a reducer for a container.
// Returns the object to serialize by the api.
type containerReducer func(context.Context, *container.Snapshot, *listContext) (*types.Container, error)
type containerReducer func(context.Context, *container.Snapshot) (*types.Container, error)

const (
// includeContainer is the action to include a container in the reducer.
Expand Down Expand Up @@ -230,7 +230,7 @@ func (daemon *Daemon) reducePsContainer(ctx context.Context, container *containe
}

// transform internal container struct into api structs
newC, err := reducer(ctx, container, filter)
newC, err := reducer(ctx, container)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -600,7 +600,7 @@ func includeContainerInList(container *container.Snapshot, filter *listContext)
// $ docker ps -a
// CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
// b0318bca5aef 3fbc63216742 "sh" 3 years ago Exited (0) 3 years ago ecstatic_beaver
func (daemon *Daemon) refreshImage(ctx context.Context, s *container.Snapshot, filter *listContext) (*types.Container, error) {
func (daemon *Daemon) refreshImage(ctx context.Context, s *container.Snapshot) (*types.Container, error) {
c := s.Container

// s.Image is the image reference passed by the user to create an image
Expand Down

0 comments on commit 45ba926

Please sign in to comment.