From 941b5734180a7657a545718435badc36dffca024 Mon Sep 17 00:00:00 2001 From: Mat Ryer Date: Tue, 11 Jul 2017 21:42:55 +0100 Subject: [PATCH] Go fmt --- example/mockpersonstore_test.go | 42 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/example/mockpersonstore_test.go b/example/mockpersonstore_test.go index 46f3338..3cf9ea5 100755 --- a/example/mockpersonstore_test.go +++ b/example/mockpersonstore_test.go @@ -4,13 +4,13 @@ package example // github.com/matryer/moq import ( - "sync" "context" + "sync" ) var ( - lockPersonStoreMockCreate sync.RWMutex - lockPersonStoreMockGet sync.RWMutex + lockPersonStoreMockCreate sync.RWMutex + lockPersonStoreMockGet sync.RWMutex ) // PersonStoreMock is a mock implementation of PersonStore. @@ -18,7 +18,7 @@ var ( // func TestSomethingThatUsesPersonStore(t *testing.T) { // // // make and configure a mocked PersonStore -// mockedPersonStore := &PersonStoreMock{ +// mockedPersonStore := &PersonStoreMock{ // CreateFunc: func(ctx context.Context, person *Person, confirm bool) error { // panic("TODO: mock out the Create method") // }, @@ -29,7 +29,7 @@ var ( // // // TODO: use mockedPersonStore in code that requires PersonStore // // and then make assertions. -// +// // } type PersonStoreMock struct { // CreateFunc mocks the Create method. @@ -65,12 +65,12 @@ func (mock *PersonStoreMock) Create(ctx context.Context, person *Person, confirm panic("moq: PersonStoreMock.CreateFunc is nil but PersonStore.Create was just called") } callInfo := struct { - Ctx context.Context - Person *Person + Ctx context.Context + Person *Person Confirm bool }{ - Ctx: ctx, - Person: person, + Ctx: ctx, + Person: person, Confirm: confirm, } lockPersonStoreMockCreate.Lock() @@ -83,13 +83,13 @@ func (mock *PersonStoreMock) Create(ctx context.Context, person *Person, confirm // Check the length with: // len(mockedPersonStore.CreateCalls()) func (mock *PersonStoreMock) CreateCalls() []struct { - Ctx context.Context - Person *Person - Confirm bool - } { + Ctx context.Context + Person *Person + Confirm bool +} { var calls []struct { - Ctx context.Context - Person *Person + Ctx context.Context + Person *Person Confirm bool } lockPersonStoreMockCreate.RLock() @@ -105,10 +105,10 @@ func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error } callInfo := struct { Ctx context.Context - Id string + Id string }{ Ctx: ctx, - Id: id, + Id: id, } lockPersonStoreMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) @@ -120,12 +120,12 @@ func (mock *PersonStoreMock) Get(ctx context.Context, id string) (*Person, error // Check the length with: // len(mockedPersonStore.GetCalls()) func (mock *PersonStoreMock) GetCalls() []struct { - Ctx context.Context - Id string - } { + Ctx context.Context + Id string +} { var calls []struct { Ctx context.Context - Id string + Id string } lockPersonStoreMockGet.RLock() calls = mock.calls.Get