.proto functions are not defined

65 views Asked by At

I'm currently a beginner in learning Go Lang, GRPC, and use of Protobuf. So I am following this video that on how to create a simple API where it sends back a message. Currently I am trying to create a .proto file and the "package", "option", "service" are undefined and not highlighted as they should be. This is the code inside my .proto file

syntax = "proto3"

package main;

option go_package = "./proto";

service TestApi {
    rpc Echo (ResponseRequest) returns (ResponseRequest) {}
    rpc GetUser (UserRequest) returns (UserResponse) {}
}

message ResponseRequest {
    string msg = 1;
}

message UserRequest {
    string uuid =1;
}

message UserResponse{
    string name = 1;
    int32 age =2;
    string email = 3;
}

1

I've installed packages for protobuf, grpc and go lang already, but I might be overlooking something. These are the the things I installed so far in cmd:

$ go install google.golang.org/protobuf/cmd/[email protected]
$ go install google.golang.org/grpc/cmd/[email protected]

These are the plugins in VSC Code I used for this specific practice material as well. Not sure if these have conflicts as well.

2
3
4
5

This is my first time asking in overflow, any help will be appreciated.

0

There are 0 answers