I have created following .proto file in the path: microservice/internal/proto-files/domain/repository.proto
syntax = "proto3";
package domain;
option go_package = "microservice/internal/gRPC/domain";
message Repository {
int64 id = 1;
string name = 2;
int64 userId = 3;
bool isPrivate = 4;
}
and also following .proto file in another path: microservice/internal/proto-files/service
syntax = "proto3";
package service;
option go_package = "microservice/internal/gRPC/service";
import "microservice/internal/proto-files/domain/repository.proto";
//RepositoryService Definition
service RepositoryService {
rpc add (domain.Repository) returns (AddRepositoryResponse);
}
message AddRepositoryResponse {
domain.Repository addedRepository = 1;
Error error = 2;
}
message Error {
string code = 1;
string message = 2;
}
but my IDE(goland) cannot resolve import in repository-service.proto and also when I use protoc command to generate .pb.go file, I will face following error:
microservice/internal/proto-files/domain/repository.proto: File not found.