zoukankan      html  css  js  c++  java
  • Kratos 下载与安装

    前置条件

    请确保已经安装好

    然后获取 kratos 工具

    go get -u github.com/go-kratos/kratos/tool/kratos
    

    验证是否安装成功

    kratos --version
    

    若安装成功会输出类似如下版本信息

    kratos version v0.5.0
    

    FAQ

    若出现如下错误:

    C:Usersigo/src: warning: directory does not exist.
    google/protobuf/descriptor.proto: File not found.
    github.com/gogo/protobuf/gogoproto/gogo.proto:32:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
    github.com/gogo/protobuf/gogoproto/gogo.proto:38:8: "google.protobuf.EnumOptions" is not defined.
    github.com/gogo/protobuf/gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.
    ...
    

    自行下载 protoc 发行版后解压把其中的 include 目录下的内容放置到 %GOPATH%/src/目录下即可.

    %GOPATH% 路径可以通过 go env GOPATH 查看

    C:Usersigosrc>tree /f
    卷 System 的文件夹 PATH 列表
    卷序列号为 E083-0A84
    C:.
    └─google
        └─protobuf
            │  any.proto
            │  api.proto
            │  descriptor.proto
            │  duration.proto
            │  empty.proto
            │  field_mask.proto
            │  source_context.proto
            │  struct.proto
            │  timestamp.proto
            │  type.proto
            │  wrappers.proto
            │
            └─compiler
                    plugin.proto
    
  • 相关阅读:
    VS2010 正则批量替换头文件路径
    VC++ 内存泄露与检测的一种方法
    命令行编译C++程序
    Link1123:转换到COFF期间失败:文件无效或损坏
    C语言基础知识
    PCL深度图像(2)
    PCL关键点(1)
    PCL采样一致性算法
    PCL滤波介绍(3)
    PCL滤波介绍(2)
  • 原文地址:https://www.cnblogs.com/taadis/p/14017782.html
Copyright © 2011-2022 走看看