mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-24 20:28:02 +08:00
fix lint issues after update
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -73,10 +73,7 @@ func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
||||
if err := d.start(ctx, sub); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.wait(ctx, sub); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return d.wait(ctx, sub)
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -119,7 +116,7 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error {
|
||||
}
|
||||
|
||||
useInit := true // let it cleanup exited processes created by BuildKit's container API
|
||||
if err := l.Wrap("creating container "+d.Name, func() error {
|
||||
return l.Wrap("creating container "+d.Name, func() error {
|
||||
hc := &container.HostConfig{
|
||||
Privileged: true,
|
||||
Mounts: []mount.Mount{
|
||||
@@ -189,14 +186,8 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := d.wait(ctx, l); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return d.wait(ctx, l)
|
||||
})
|
||||
}
|
||||
|
||||
func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error {
|
||||
|
@@ -87,10 +87,7 @@ func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
||||
return sub.Wrap(
|
||||
fmt.Sprintf("waiting for %d pods to be ready", d.minReplicas),
|
||||
func() error {
|
||||
if err := d.wait(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return d.wait(ctx)
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -228,7 +225,7 @@ func (d *Driver) Factory() driver.Factory {
|
||||
return d.factory
|
||||
}
|
||||
|
||||
func (d *Driver) Features(ctx context.Context) map[driver.Feature]bool {
|
||||
func (d *Driver) Features(_ context.Context) map[driver.Feature]bool {
|
||||
return map[driver.Feature]bool{
|
||||
driver.OCIExporter: true,
|
||||
driver.DockerExporter: d.DockerAPI != nil,
|
||||
@@ -237,6 +234,6 @@ func (d *Driver) Features(ctx context.Context) map[driver.Feature]bool {
|
||||
}
|
||||
}
|
||||
|
||||
func (d *Driver) HostGatewayIP(ctx context.Context) (net.IP, error) {
|
||||
func (d *Driver) HostGatewayIP(_ context.Context) (net.IP, error) {
|
||||
return nil, errors.New("host-gateway is not supported by the kubernetes driver")
|
||||
}
|
||||
|
Reference in New Issue
Block a user