diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2019-03-27 19:40:21 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2019-03-27 19:40:21 +0300 |
commit | a21a578e930dece701182fdc97d45626008de23c (patch) | |
tree | 808c19c8f67860086bf1096688e41d10764b7d79 | |
parent | 2b4b9eb13008f12efd3d624440125b38729a6ff8 (diff) |
Update dummy example to use gitalypb instead of pb
-rw-r--r-- | doc/beginners_guide.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/beginners_guide.md b/doc/beginners_guide.md index 3029bb454..fa60ee136 100644 --- a/doc/beginners_guide.md +++ b/doc/beginners_guide.md @@ -177,17 +177,17 @@ When we run `make` again, we now get a different error. ``` # gitlab.com/gitlab-org/gitaly/internal/service/repository -_build/src/gitlab.com/gitlab-org/gitaly/internal/service/repository/server.go:15:17: cannot use server literal (type *server) as type gitaly.RepositoryServiceServer in return argument: - *server does not implement gitaly.RepositoryServiceServer (wrong type for RestoreCustomHooks method) +_build/src/gitlab.com/gitlab-org/gitaly/internal/service/repository/server.go:15:17: cannot use server literal (type *server) as type gitalypb.RepositoryServiceServer in return argument: + *server does not implement gitalypb.RepositoryServiceServer (wrong type for RestoreCustomHooks method) have RestoreCustomHooks() - want RestoreCustomHooks(gitaly.RepositoryService_RestoreCustomHooksServer) error + want RestoreCustomHooks(gitalypb.RepositoryService_RestoreCustomHooksServer) error ``` This error tells us the expected signature. We copy-paste this -signature into server.go, **changing `gitaly` to `pb`**. +signature into server.go. ``` -func (*server) RestoreCustomHooks(pb.RepositoryService_RestoreCustomHooksServer) error { +func (*server) RestoreCustomHooks(gitalypb.RepositoryService_RestoreCustomHooksServer) error { } ``` @@ -203,7 +203,7 @@ The final solution is to add server.go, and make the function: ``` -func (*server) RestoreCustomHooks(pb.RepositoryService_RestoreCustomHooksServer) error { +func (*server) RestoreCustomHooks(gitalypb.RepositoryService_RestoreCustomHooksServer) error { return helper.Unimplemented } ``` |