前言

在 proto 文件夹下执行如下命令:

$ protoc --go_out=plugins=grpc:. *.proto

报错:无法确定Go导入路径

protoc-gen-go: unable to determine Go import path for "search.proto"

Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line. See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more informa
tion. --go_out: protoc-gen-go: Plugin failed with status code 1.

解决方法

在所有的 .proto 文件中指定路径

option go_package ="./pb";

举例:proto文件 新增第三句代码

syntax = "proto3";

package proto;

option go_package ="./proto"; // 指定RPC文件生成路径地址

service SearchService {
rpc Search(SearchRequest) returns (SearchResponse) {}
} message SearchRequest {
string request = 1;
} message SearchResponse {
string response = 1;
}

grpc unable to determine Go import path for的更多相关文章

  1. 解决PKIX:unable to find valid certification path to requested target 的问题

    这两天在twitter服务器上忽然遇到这样的异常: e: sun.security.validator.ValidatorException: PKIX path building failed: s ...

  2. 解决 java 使用ssl过程中出现"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

    今天,封装HttpClient使用ssl时报一下错误: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExc ...

  3. 解决PKIX(PKIX path building failed) 问题 unable to find valid certification path to requested target

    最近在写java的一个服务,需要给远程服务器发送post请求,认证方式为Basic Authentication,在请求过程中出现了 PKIX path building failed: sun.se ...

  4. Pop3_解决PKIX:unable to find valid certification path to requested target 的问题

    最近有公司pop3协议接收pp邮箱出现异常,连不上服务器,错误内容: e: sun.security.validator.ValidatorException: PKIX path building ...

  5. unable to find valid certification path to requested target

    Error : javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path bu ...

  6. Java Spring Boot: Unable to determine jdbc url from datasource

    如果你和我一样从github或码云上下载了一个几年前别人写的demo代码,想用来做学习用.编译的时候遇到下面这样的错误,然后死命上网查各种方案,百试不灵.试尽了各种方案,就是还连接不上数据库.你可以试 ...

  7. azure iothub create-device-identity样例报错: unable to find valid certification path ,及iothub-explorer Error: CERT_UNTRUSTED

    https://docs.microsoft.com/zh-cn/azure/iot-hub/iot-hub-java-java-getstarted 在IDEA中执行上述的代码,会出现下面的报错信息 ...

  8. 工作日志,证书无效 unable to find valid certification path to requested target

    工作日志,证书无效 unable to find valid certification path to requested target 最近被这个问题弄得头大.导致所有用到 se.transmod ...

  9. Maven:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    还是记录使用 maven 时遇到的问题. 一.maven报错 maven package 进行打包时出现了以下报错: Non-resolvable parent POM for com.wpbxin: ...

  10. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    注:网上搜来的快照,暂未验证 在java代码中请求https链接的时候,可能会报下面这个错误javax.net.ssl.SSLHandshakeException: sun.security.vali ...

随机推荐

  1. Qt/C++开发经验小技巧291-295

    国内站点:https://gitee.com/feiyangqingyun 国际站点:https://github.com/feiyangqingyun 关于在pro中区分linux系统,在Qt4套件 ...

  2. 手写 PromiseA+ 实现,轻松通过 872 条用例

    手写 Promise/A+ 实现,轻松通过 872 条用例 规范参考:Promise/A+ 规范 - 中文版本 测试工具:https://github.com/promises-aplus/promi ...

  3. Slate文档编辑器-Decorator装饰器渲染调度

    Slate文档编辑器-Decorator装饰器渲染调度 在之前我们聊到了基于文档编辑器的数据结构设计,聊了聊基于slate实现的文档编辑器类型系统,那么当前我们来研究一下slate编辑器中的装饰器实现 ...

  4. 跟着源码学IM(八):万字长文,手把手教你用Netty打造IM聊天

    本文作者芋艿,原题"使用 Netty 实现 IM 聊天贼简单",本底价有修订和改动. 一.本文引言 上篇<跟着源码学IM(七):手把手教你用WebSocket打造Web端IM ...

  5. w3cschool-memcached教程

    https://www.w3cschool.cn/memcached/ Memcached 教程 Memcached是一个自由开源的,高性能,分布式内存对象缓存系统.   手册简介 Memcached ...

  6. weixueyuan-Nginx缓存6

    https://www.weixueyuan.net/nginx/cache/ Nginx Web缓存配置 Web 缓存可节约网络带宽,有效提高用户打开网站的速度.由于应用服务器被请求次数的降低,也相 ...

  7. Mybatis框架详解

    Mybatis框架(1)---Mybatis入门 mybatis入门   MyBatis是什么? MyBatis 本是apache的一个开源项目iBatis, 2010年这个项目由apache sof ...

  8. 如何在 ASP.NET Core 中实现速率限制?

    在 ASP.NET Core 中实现速率限制(Rate Limiting)中间件可以帮助你控制客户端对 API 的请求频率,防止滥用和过载.速率限制通常用于保护服务器资源,确保服务的稳定性和可用性. ...

  9. 文章学习:基于AVX-512指令集的同态加密算法中大整数运算性能优化与突破

    学习文章:英特尔×同态科技 | 基于AVX-512指令集的同态加密算法中大整数运算性能优化与突破 文章 人工智能的安全隐患 ChatGPT的成功大部分来源于海量的数据支撑和丰富的数据维度,基于13亿参 ...

  10. Linux:安装nodejs

    yum安装 自带版本 yum install nodejs 但是版本很低[6.17.1] 高版本 参考:链接 1.删除旧版本 yum remove nodejs 2.添加Node.js Yum存储库 ...