mirror of https://github.com/docker/cli.git
24 lines
430 B
Go
24 lines
430 B
Go
package system
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/client"
|
|
)
|
|
|
|
type fakeClient struct {
|
|
client.Client
|
|
|
|
version string
|
|
serverVersion func(ctx context.Context) (types.Version, error)
|
|
}
|
|
|
|
func (cli *fakeClient) ServerVersion(ctx context.Context) (types.Version, error) {
|
|
return cli.serverVersion(ctx)
|
|
}
|
|
|
|
func (cli *fakeClient) ClientVersion() string {
|
|
return cli.version
|
|
}
|