0
$ protoc --go_out=module=github.com/redmcme/go-protos:. \
         --go-grpc_out=module=github.com/redmcme/go-protos:. \
        --proto_path ../protos \
          ../protos/*/**
teams.team: File not found.
teams/season.proto:3:1: Import "teams.team" was not found or had errors.
teams/season.proto:22:18: "team.Team" is not defined.

Build command ^

$ ltt ../protos
../protos
├── skyblock
│  └── player.proto
└── teams
   ├── season.proto
   └── team.proto

Directory tree ^

// team.proto
syntax = "proto3";

package teams.team;
option go_package = "github.com/redmcme/go-protos/teams/team";

...

Team proto ^ // season.proto syntax = "proto3";

import "teams.team";

package teams.season;
option go_package = "github.com/redmcme/go-protos/teams/season";

Season proto ^

Does anyone know why protoc failed to find the import

1 Answer 1

0

import "teams.team" is wrong way

the true way is import "team.proto" or import “teams/team.proto”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.