Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
konoui committed May 16, 2024
1 parent b9c1e3a commit 1ab105e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/lipo/archs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestLipo_ArchsWithError(t *testing.T) {
t.Error("should occur error")
return
}
tl := testlipo.NewLipoBin(t, testlipo.IgnoreErr(true))
tl := testlipo.NewLipoBin(t, testlipo.WithIgnoreErr(true))
want := "can't figure out the architecture type of: not-binary"
got1 := tl.Archs(t, input)
got2 := err.Error()
Expand Down
2 changes: 1 addition & 1 deletion pkg/lipo/detailed_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestLipo_DetailedInfoWithError(t *testing.T) {
return
}

tl := testlipo.NewLipoBin(t, testlipo.IgnoreErr(true))
tl := testlipo.NewLipoBin(t, testlipo.WithIgnoreErr(true))
want := "can't figure out the architecture type of: not-binary"
got1 := tl.DetailedInfo(t, input)
got2 := err.Error()
Expand Down
2 changes: 1 addition & 1 deletion pkg/lipo/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestLipo_Info(t *testing.T) {

want := err.Error()

tl := testlipo.NewLipoBin(t, testlipo.IgnoreErr(true))
tl := testlipo.NewLipoBin(t, testlipo.WithIgnoreErr(true))
got := tl.Info(t, in)

if !strings.HasSuffix(got, want) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/testlipo/testlipo.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func WithFat64(v bool) Opt {
}
}

// IgnoreErr will ignore a lipo command error not to call t.Fatal()
func IgnoreErr(v bool) Opt {
// WithIgnoreErr will ignore a lipo command error not to call t.Fatal()
func WithIgnoreErr(v bool) Opt {
return func(l *LipoBin) {
l.ignoreErr = v
}
Expand Down

0 comments on commit 1ab105e

Please sign in to comment.