1. goctl has already installed, but it shows
command not found: goctl when executing commands.#
If you installed via
go get, then
goctl should be located in
You can check the full path with
go env GOPATH, whether your
goctl is in
goctl is in
$GOPATH or in another directory, the reason for the above problem is that the directory where
goctl is located is not in
PATH (environment variable).
You can refer to [rpc writing and calling] in the Quick Start (...) for this question. /advance/rpc-call), which describes the logic for using rpc calls.
goctl for import proto specifies
protoc flag mapping, i.e.
goctl will pass this flag value to
4. Assuming that
base.proto is introduced by main proto, why not generate
For a file like
base.proto, the developer usually has a need for message reuse, and the source is not only the
proto file written by the developer, but also the
It may also come from some basic proto provided in
google.golang.org/grpc, such as
google/protobuf/any.proto, if generated by
then the point of centralizing these proto's would be lost.
can be passed with the optional parametercache.WithExpiry` to control the cache time to 1 day, for example, with the following code:
Please refer to [jwt forensics](... /advance/jwt)
Please refer to [middleware](... /advance/middleware) /advance/middleware)
faq will update from time to time the problems you encounter, you are also welcome to write the common problems here via pr.