grpc-ecosystem/grpc-gateway

Usage instructions incomplete

Open

#346 opened on Apr 4, 2017

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Go (16,971 stars) (2,250 forks)batch import
documentationhelp wanted

Description

I am following the usage instructions. I have created all the stubs and now I arrived at this point:

Note: After generating the code for each of the stubs, in order to build the code, you will want to run go get . from the directory containing the stubs.

After creating the go stubs all I get is this:

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>cmd -v
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>dir /B
myservice.pb.go
myservice.pb.gw.go
myservice.proto

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>echo %GOROOT%
C:\Go\

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>echo %GOPATH%
C:\cygwin64\home\username\go

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>dir /B %GOPATH%
bin
pkg
src

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>go version
go version go1.8 windows/amd64

C:\cygwin64\home\username\sourcecode\myservice\src\main\proto>go get .
go install: no install location for directory C:\cygwin64\home\username\sourcecode\myservice\src\main\proto outside GOPATH
        For more details see: 'go help gopath'

I am not a go developer. When i move the go stubs inside the go workspace, e.g. %GOPATH%\src\myservice and cd into that directory and execute go get . it does not complain anymore and creates this file %GOPATH%\pkg\windows_amd64\myservice.a.

Contributor guide