Skip to content

Commit

Permalink
Use named parameters when constructing structs
Browse files Browse the repository at this point in the history
  • Loading branch information
aramprice committed Sep 7, 2023
1 parent 51e06f3 commit 13dde82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion commandparser/construct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ var _ = Describe("construct", func() {

BeforeEach(func() {
f = flag.NewFlagSet("test", flag.ExitOnError)
gf = &commandparser.GlobalFlags{false, false, false}
gf = &commandparser.GlobalFlags{}

fakeFactory = &commandparserfakes.FakeVMPreparerFactory{}
fakeVmConstruct = &commandparserfakes.FakeVmConstruct{}
Expand Down
2 changes: 1 addition & 1 deletion commandparser/package_messenger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var _ = Describe("PackageMessenger", func() {

BeforeEach(func() {
buf = gbytes.NewBuffer()
messenger = &commandparser.PackageMessenger{buf}
messenger = &commandparser.PackageMessenger{Output: buf}
})

It("writes the error message to the write when InvalidOutputConfig is called", func() {
Expand Down
2 changes: 1 addition & 1 deletion commandparser/package_stemcell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var _ = Describe("package_stemcell", func() {

PkgCmd = commandparser.NewPackageCommand(oSAndVersionGetter, packagerFactory, packagerMessenger)
PkgCmd.SetFlags(f)
PkgCmd.GlobalFlags = &commandparser.GlobalFlags{false, false, false}
PkgCmd.GlobalFlags = &commandparser.GlobalFlags{}
})

var defaultArgs = []string{}
Expand Down

0 comments on commit 13dde82

Please sign in to comment.