style(identity): fix inline methods in mock identity

Steve Moyer created

Change summary

entities/identity/identity_test.go | 69 +++++++++++++++++++++++++------
entities/identity/version_test.go  | 69 +++++++++++++++++++++++++------
2 files changed, 110 insertions(+), 28 deletions(-)

Detailed changes

entities/identity/identity_test.go 🔗

@@ -19,20 +19,61 @@ type testIdentityMock struct {
 	email string
 }
 
-func (m *testIdentityMock) Name() string                                        { return m.name }
-func (m *testIdentityMock) Login() string                                      { return m.login }
-func (m *testIdentityMock) Email() string                                     { return m.email }
-func (m *testIdentityMock) DisplayName() string                               { return m.name }
-func (m *testIdentityMock) AvatarUrl() string                                 { return "" }
-func (m *testIdentityMock) Keys() []*Key                                      { return nil }
-func (m *testIdentityMock) SigningKey(repo repository.RepoKeyring) (*Key, error) { return nil, nil }
-func (m *testIdentityMock) ValidKeysAtTime(clockName string, time lamport.Time) []*Key { return nil }
-func (m *testIdentityMock) LastModification() timestamp.Timestamp             { return 0 }
-func (m *testIdentityMock) LastModificationLamports() map[string]lamport.Time { return nil }
-func (m *testIdentityMock) IsProtected() bool                                 { return false }
-func (m *testIdentityMock) Validate() error                                   { return nil }
-func (m *testIdentityMock) NeedCommit() bool                                  { return false }
-func (m *testIdentityMock) Id() entity.Id                                     { return "" }
+func (m *testIdentityMock) Name() string {
+	return m.name
+}
+
+func (m *testIdentityMock) Login() string {
+	return m.login
+}
+
+func (m *testIdentityMock) Email() string {
+	return m.email
+}
+
+func (m *testIdentityMock) DisplayName() string {
+	return m.name
+}
+
+func (m *testIdentityMock) AvatarUrl() string {
+	return ""
+}
+
+func (m *testIdentityMock) Keys() []*Key {
+	return nil
+}
+
+func (m *testIdentityMock) SigningKey(repo repository.RepoKeyring) (*Key, error) {
+	return nil, nil
+}
+
+func (m *testIdentityMock) ValidKeysAtTime(clockName string, time lamport.Time) []*Key {
+	return nil
+}
+
+func (m *testIdentityMock) LastModification() timestamp.Timestamp {
+	return 0
+}
+
+func (m *testIdentityMock) LastModificationLamports() map[string]lamport.Time {
+	return nil
+}
+
+func (m *testIdentityMock) IsProtected() bool {
+	return false
+}
+
+func (m *testIdentityMock) Validate() error {
+	return nil
+}
+
+func (m *testIdentityMock) NeedCommit() bool {
+	return false
+}
+
+func (m *testIdentityMock) Id() entity.Id {
+	return ""
+}
 
 // identitiesEqual compares two identities by their versions
 func identitiesEqual(left, right *Identity) bool {

entities/identity/version_test.go 🔗

@@ -20,20 +20,61 @@ type testVersionMockIdentity struct {
 	email string
 }
 
-func (m *testVersionMockIdentity) Name() string                                        { return m.name }
-func (m *testVersionMockIdentity) Login() string                                      { return m.login }
-func (m *testVersionMockIdentity) Email() string                                     { return m.email }
-func (m *testVersionMockIdentity) DisplayName() string                               { return m.name }
-func (m *testVersionMockIdentity) AvatarUrl() string                                 { return "" }
-func (m *testVersionMockIdentity) Keys() []*Key                                      { return nil }
-func (m *testVersionMockIdentity) SigningKey(repo repository.RepoKeyring) (*Key, error) { return nil, nil }
-func (m *testVersionMockIdentity) ValidKeysAtTime(clockName string, time lamport.Time) []*Key { return nil }
-func (m *testVersionMockIdentity) LastModification() timestamp.Timestamp             { return 0 }
-func (m *testVersionMockIdentity) LastModificationLamports() map[string]lamport.Time { return nil }
-func (m *testVersionMockIdentity) IsProtected() bool                                 { return false }
-func (m *testVersionMockIdentity) Validate() error                                   { return nil }
-func (m *testVersionMockIdentity) NeedCommit() bool                                  { return false }
-func (m *testVersionMockIdentity) Id() entity.Id                                     { return "" }
+func (m *testVersionMockIdentity) Name() string {
+	return m.name
+}
+
+func (m *testVersionMockIdentity) Login() string {
+	return m.login
+}
+
+func (m *testVersionMockIdentity) Email() string {
+	return m.email
+}
+
+func (m *testVersionMockIdentity) DisplayName() string {
+	return m.name
+}
+
+func (m *testVersionMockIdentity) AvatarUrl() string {
+	return ""
+}
+
+func (m *testVersionMockIdentity) Keys() []*Key {
+	return nil
+}
+
+func (m *testVersionMockIdentity) SigningKey(repo repository.RepoKeyring) (*Key, error) {
+	return nil, nil
+}
+
+func (m *testVersionMockIdentity) ValidKeysAtTime(clockName string, time lamport.Time) []*Key {
+	return nil
+}
+
+func (m *testVersionMockIdentity) LastModification() timestamp.Timestamp {
+	return 0
+}
+
+func (m *testVersionMockIdentity) LastModificationLamports() map[string]lamport.Time {
+	return nil
+}
+
+func (m *testVersionMockIdentity) IsProtected() bool {
+	return false
+}
+
+func (m *testVersionMockIdentity) Validate() error {
+	return nil
+}
+
+func (m *testVersionMockIdentity) NeedCommit() bool {
+	return false
+}
+
+func (m *testVersionMockIdentity) Id() entity.Id {
+	return ""
+}
 
 func makeIdentityTestRepo(t *testing.T) repository.ClockedRepo {
 	repo := repository.NewMockRepo()