#Import a proto file from another folder

2 messages · Page 1 of 1 (latest)

random roost
#

So i have this structure where i have main folder, where i have all my grpc servers(that are go modules) and i have a proto folder where i let all my protos(some protos use messages from others, so was the way i found to make things work)
now i'm trying to understand how to inport the .pb.go to the servers, but i can't find a way to import files that are not some kind of module

-my_project
  -server1
    -go.mod
    -main.go
  -server2
    -go.mod
    -main.go
  -server3
    -go.mod
    -main.go
  -protos
    -p1.proto
    -p1.pb.go
    ...
#

i'm building this way because each one is a service that will be deployed separated, but i want to keep all in one folder, just to be easier to navigate in the IDE