diff --git a/builder/builder-next/adapters/containerimage/pull.go b/builder/builder-next/adapters/containerimage/pull.go index bc736188f3..43b84919c7 100644 --- a/builder/builder-next/adapters/containerimage/pull.go +++ b/builder/builder-next/adapters/containerimage/pull.go @@ -275,7 +275,7 @@ func (p *puller) resolve(ctx context.Context) error { ref, err := distreference.ParseNormalizedNamed(p.src.Reference.String()) if err != nil { p.resolveErr = err - resolveProgressDone(err) + _ = resolveProgressDone(err) return } @@ -283,7 +283,7 @@ func (p *puller) resolve(ctx context.Context) error { origRef, desc, err := p.resolver.Resolve(ctx, ref.String()) if err != nil { p.resolveErr = err - resolveProgressDone(err) + _ = resolveProgressDone(err) return } @@ -300,19 +300,19 @@ func (p *puller) resolve(ctx context.Context) error { ref, err := distreference.WithDigest(ref, p.desc.Digest) if err != nil { p.resolveErr = err - resolveProgressDone(err) + _ = resolveProgressDone(err) return } _, dt, err := p.is.ResolveImageConfig(ctx, ref.String(), gw.ResolveImageConfigOpt{Platform: &p.platform, ResolveMode: resolveModeToString(p.src.ResolveMode)}, p.sm) if err != nil { p.resolveErr = err - resolveProgressDone(err) + _ = resolveProgressDone(err) return } p.config = dt } - resolveProgressDone(nil) + _ = resolveProgressDone(nil) }) return p.resolveErr } @@ -509,7 +509,7 @@ func (p *puller) Snapshot(ctx context.Context) (cache.ImmutableRef, error) { tm := time.Now() end = &tm } - pw.Write("extracting "+p.ID, progress.Status{ + _ = pw.Write("extracting "+p.ID, progress.Status{ Action: "extract", Started: &st.st, Completed: end, @@ -672,7 +672,7 @@ func showProgress(ctx context.Context, ongoing *jobs, cs content.Store, pw progr refKey := remotes.MakeRefKey(ctx, j.Descriptor) if a, ok := actives[refKey]; ok { started := j.started - pw.Write(j.Digest.String(), progress.Status{ + _ = pw.Write(j.Digest.String(), progress.Status{ Action: a.Status, Total: int(a.Total), Current: int(a.Offset), @@ -685,7 +685,7 @@ func showProgress(ctx context.Context, ongoing *jobs, cs content.Store, pw progr info, err := cs.Info(context.TODO(), j.Digest) if err != nil { if containerderrors.IsNotFound(err) { - // pw.Write(j.Digest.String(), progress.Status{ + // _ = pw.Write(j.Digest.String(), progress.Status{ // Action: "waiting", // }) continue @@ -697,7 +697,7 @@ func showProgress(ctx context.Context, ongoing *jobs, cs content.Store, pw progr if done || j.done { started := j.started createdAt := info.CreatedAt - pw.Write(j.Digest.String(), progress.Status{ + _ = pw.Write(j.Digest.String(), progress.Status{ Action: "done", Current: int(info.Size), Total: int(info.Size), @@ -783,13 +783,13 @@ func oneOffProgress(ctx context.Context, id string) func(err error) error { st := progress.Status{ Started: &now, } - pw.Write(id, st) + _ = pw.Write(id, st) return func(err error) error { // TODO: set error on status now := time.Now() st.Completed = &now - pw.Write(id, st) - pw.Close() + _ = pw.Write(id, st) + _ = pw.Close() return err } } diff --git a/builder/builder-next/exporter/export.go b/builder/builder-next/exporter/export.go index d82a6a5635..4e0ba0214a 100644 --- a/builder/builder-next/exporter/export.go +++ b/builder/builder-next/exporter/export.go @@ -130,7 +130,7 @@ func (e *imageExporterInstance) Export(ctx context.Context, inp exporter.Source) diffs[i] = digest.Digest(diffIDs[i]) } - layersDone(nil) + _ = layersDone(nil) } if len(config) == 0 { @@ -160,7 +160,7 @@ func (e *imageExporterInstance) Export(ctx context.Context, inp exporter.Source) if err != nil { return nil, configDone(err) } - configDone(nil) + _ = configDone(nil) if e.opt.ReferenceStore != nil { for _, targetName := range e.targetNames { @@ -169,7 +169,7 @@ func (e *imageExporterInstance) Export(ctx context.Context, inp exporter.Source) if err := e.opt.ReferenceStore.AddTag(targetName, digest.Digest(id), true); err != nil { return nil, tagDone(err) } - tagDone(nil) + _ = tagDone(nil) } } diff --git a/builder/builder-next/exporter/writer.go b/builder/builder-next/exporter/writer.go index c0aff65ece..64d260f230 100644 --- a/builder/builder-next/exporter/writer.go +++ b/builder/builder-next/exporter/writer.go @@ -204,13 +204,13 @@ func oneOffProgress(ctx context.Context, id string) func(err error) error { st := progress.Status{ Started: &now, } - pw.Write(id, st) + _ = pw.Write(id, st) return func(err error) error { // TODO: set error on status now := time.Now() st.Completed = &now - pw.Write(id, st) - pw.Close() + _ = pw.Write(id, st) + _ = pw.Close() return err } } diff --git a/builder/builder-next/worker/worker.go b/builder/builder-next/worker/worker.go index 40d9a2e23f..a47ded37f4 100644 --- a/builder/builder-next/worker/worker.go +++ b/builder/builder-next/worker/worker.go @@ -394,7 +394,7 @@ func (ld *layerDescriptor) Download(ctx context.Context, progressOutput pkgprogr if err := contentutil.Copy(ctx, ld.w.ContentStore, ld.provider, ld.desc); err != nil { return nil, 0, done(err) } - done(nil) + _ = done(nil) ra, err := ld.w.ContentStore.ReaderAt(ctx, ld.desc) if err != nil { @@ -443,13 +443,13 @@ func oneOffProgress(ctx context.Context, id string) func(err error) error { st := progress.Status{ Started: &now, } - pw.Write(id, st) + _ = pw.Write(id, st) return func(err error) error { // TODO: set error on status now := time.Now() st.Completed = &now - pw.Write(id, st) - pw.Close() + _ = pw.Write(id, st) + _ = pw.Close() return err } }