Skip to content

Commit

Permalink
container: make container.NewResolver() return a pointer
Browse files Browse the repository at this point in the history
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
osbuild/bootc-image-builder#139 (comment)
  • Loading branch information
mvo5 committed Feb 8, 2024
1 parent a712231 commit c12ffd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/container/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c12ffd7

Please sign in to comment.