github.1git.de/docker/cli@v26.1.3+incompatible/cli/command/builder/client_test.go (about)

     1  package builder
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/docker/docker/api/types"
     7  	"github.com/docker/docker/client"
     8  )
     9  
    10  type fakeClient struct {
    11  	client.Client
    12  	builderPruneFunc func(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
    13  }
    14  
    15  func (c *fakeClient) BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) {
    16  	if c.builderPruneFunc != nil {
    17  		return c.builderPruneFunc(ctx, opts)
    18  	}
    19  	return nil, nil
    20  }