[gRPC/Protocol Buffer]WARNING: Missing 'go_package' option in "***.proto"

프로그래밍/Go lang2020. 11. 5. 18:23

protoc 명령어를 사용하니 아래의 WARNING이 발생했습니다.

 WARNING: Missing 'go_package' option in "***.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.

See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.

안내에 따라

developers.google.com/protocol-buffers/docs/reference/go-generated#package

사이트를 가보니 아래의 설명이 있습니다.

 

Source .proto files should contain a go_package option specifying the full Go import path for the file. If there is no go_package option, the compiler will try to guess at one. A future release of the compiler will make the go_package option a requirement. The Go package name of generated code will be the last path component of the go_package option.

 

full Go import path를 .proto파일에 명시하라는 이야기입니다.

 

아무래도 go.mod 파일의 위치를 명시하라는 이야기 같은데 추후 확인해보겠습니다.

 

작성자

Posted by 드리머즈

관련 글

댓글 영역