Go
凭栏观雨_远
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用protoc编译时出现Import “google/protobuf/any.proto“ was not found or had errors. 问题的解决方法
摘要 解决protoc编译时"google/protobuf/any.proto"找不到的问题:首先从GitHub克隆protobuf源码到本地目录,然后在protoc命令中添加两个-I参数:1) 指向protobuf源码中的src目录;2) 指向待编译proto文件的上层目录。例如:protoc proto/example.proto --go_out=. --go-grpc_out=. --zrpc_out=. -I=~/pb/protobuf/src -I=~/project。该方原创 2025-12-10 14:03:24 · 388 阅读 · 0 评论 -
k8s安装helm和kube-batch
安装helm # https://github.com/helm/helm/releases wget https://get.helm.sh/helm-v3.5.4-linux-amd64.tar.gz tart -zxvf helm-v3.5.4-linux-amd64.tar.gz mv linux-amd64/helm /usr/local/bin/helm helm version kube-batch mkdir go 在~/.bash_proflie中配置GOPATH source原创 2021-05-13 20:11:49 · 388 阅读 · 0 评论 -
golang logrus日志框架配置标准输出和文件输出,文件按天切割
import (rotatelogs "github.com/lestrrat/go-file-rotatelogs" "io" "github.com/sirupsen/logrus" ) ////代码示例 logFilePath := fmt.Sprintf("%s/%s/", logFileBasePath, podName) fileStr := strings.Trim(logFilePath, " \r\n") var logPath string index := s原创 2021-03-24 20:59:23 · 1606 阅读 · 0 评论 -
Go 学校,班级,学生类的三级关系
package main import ( "fmt" "strconv" ) type Student struct { name string age int } type Class struct { className string students []Student } type School struct { schoolNam...原创 2018-07-18 11:56:32 · 559 阅读 · 0 评论
分享