Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
jferrl committed Apr 27, 2024
1 parent 6df2363 commit dbfb250
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions yo.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ type Yoable[Y any] interface {
type Opt[T Yoable[T]] func(*Model[T])

// WithSpannerClientOption returns an Opt that sets the spanner client.
func WithSpannerClientOption[T Yoable[T]](c spanner.Client) Opt[T] {
func WithSpannerClientOption[T Yoable[T]](c *spanner.Client) Opt[T] {
return func(m *Model[T]) {
m.Client = c
m.Client = *c
}
}

Expand Down
2 changes: 1 addition & 1 deletion yo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestModel_Apply(t *testing.T) {
defer cleanup()

m := NewModel(tt.fields.model,
WithSpannerClientOption[*user.User](*spannerClient),
WithSpannerClientOption[*user.User](spannerClient),
)

before, after := tt.mutType.Hooks()
Expand Down

0 comments on commit dbfb250

Please sign in to comment.