From c12ffd7c9fa01ee1eb8a7b42d3eb45791de3047a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Feb 2024 16:13:58 +0100 Subject: [PATCH] container: make `container.NewResolver()` return a pointer Most go packages return pointers to structs when using `NewFoo()`. But `NewResolver()` does not and AFAICT there is no deep reason for this. I would prefer to return a pointer here, I got tripped up by this in https://github.com/osbuild/bootc-image-builder/pull/139#discussion_r1479679146 --- pkg/container/resolver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/container/resolver.go b/pkg/container/resolver.go index daf5094854..58469bca85 100644 --- a/pkg/container/resolver.go +++ b/pkg/container/resolver.go @@ -31,8 +31,8 @@ type SourceSpec struct { StoragePath *string } -func NewResolver(arch string) Resolver { - return Resolver{ +func NewResolver(arch string) *Resolver { + return &Resolver{ ctx: context.Background(), queue: make(chan resolveResult, 2), Arch: arch,