-
-
Save sevein/ddbec1c4e00ea3c3e1c14c8efb5c335b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/server/server.go b/server/server.go | |
index 16d2068..930602d 100644 | |
--- a/server/server.go | |
+++ b/server/server.go | |
@@ -35,0 +36,2 @@ func (b *Backend) AddUser(ctx context.Context, user *pbExample.User) (*types.Emp | |
+ var empty = &types.Empty{} | |
+ | |
@@ -47 +49 @@ func (b *Backend) AddUser(ctx context.Context, user *pbExample.User) (*types.Emp | |
- return nil, detSt.Err() | |
+ return empty, detSt.Err() | |
@@ -49 +51 @@ func (b *Backend) AddUser(ctx context.Context, user *pbExample.User) (*types.Emp | |
- return nil, st.Err() | |
+ return empty, st.Err() | |
@@ -55 +57 @@ func (b *Backend) AddUser(ctx context.Context, user *pbExample.User) (*types.Emp | |
- return nil, status.Error(codes.FailedPrecondition, "user already exists") | |
+ return empty, status.Error(codes.FailedPrecondition, "user already exists") | |
@@ -66 +68 @@ func (b *Backend) AddUser(ctx context.Context, user *pbExample.User) (*types.Emp | |
- return nil, nil | |
+ return empty, nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment