
Go
凭栏观雨_远
这个作者很懒,什么都没留下…
展开
-
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 · 314 阅读 · 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 · 1421 阅读 · 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 · 492 阅读 · 0 评论