Skip to content

[v1.1.1]failed: the work directory must be found in the go mod or the $GOPATH #16

@fangxh2013

Description

@fangxh2013

macOS: 12.3.1

goctl-intellij version:1.1.1

go-zero version: 1.3.3

goctl version 1.3.5 darwin/amd64

use goctl rpc protoc account.proto --go_out=. --go-grpc_out=. --zrpc_out=. generate success.

Right click to use goctl to generate rpc code, the following error occurs:

14:32 Use shell: bash

14:32 lookup at PATH: /usr/bin:/bin:/usr/sbin:/sbin

14:32 lookup at the default GOPATH: /Users/golang/go/bin/goctl

14:32 Use shell: bash

14:32 goctl:/Users/golang/go/bin/goctl

14:33 $ goctl rpc protoc -I /Users/golang/Documents/git/wallet-core/service/account/rpc /Users/golang/Documents/git/wallet-core/service/account/rpc/account.proto --style gozero --zrpc_out /Users/golang/Documents/git/wallet-core/service/account/rpc --go_out /Users/golang/Documents/git/wallet-core/service/account/rpc --go-grpc_out /Users/golang/Documents/git/wallet-core/service/account/rpc --home /Users/golang/.goctl

14:33 Exit code 1

14:33 get project context from workdir[/Users/golang/Documents/git/wallet-core/service/account/rpc] failed: the work directory must be found in the go mod or the $GOPATH
�[31msh: go: command not found�[0m

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions