这是.proto我使用的文件:
pkg/apis/workflow/v1alpha1/generated.proto
syntax = 'proto2';
package go-server.com.argo-new.pkg.apis.workflow.v1alpha1;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/api/policy/v1beta1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "v1alpha1";
// ArchiveStrategy describes how to archive files/directory when saving artifacts
message ArchiveStrategy {
optional TarStrategy tar = 1;
optional NoneStrategy none = 2;
}
当我尝试编译时:
protoc -I /usr/local/include -I . -I ./vendor -I /root/go/src \
-I /root/go/pkg/mod/github.com/gogo/protobuf@v1.3.1/gogoproto \
-I /root/go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.12.2/third_party/googleapis \
--include_imports --gogofast_out=plugins=grpc:/root/go/src \
--grpc-gateway_out=logtostderr=true:/root/go/src \
--swagger_out=logtostderr=true,fqn_for_swagger_name=true:. \
pkg/apis/workflow/v1alpha1/generated.proto
它提醒我:
pkg/apis/workflow/v1alpha1/generated.proto:6:11: Expected ";"
这是一个编译错误,这意味着包名不应包含-.
是否有任何方法可用于-包名称或任何解决方法?
谢谢!
猛跑小猪
相关分类