Go
Go-常用函数备忘
· ☕ 1 分钟
重要 记录常用的一些函数 1. 字符串转int64 1 2 3 4 5 6 7 // Use the max value for signed 64 integer. http://golang.org/pkg/builtin/#int64 var s string = "9223372036854775807" i, err := strconv.ParseInt(s, 10, 64) if err != nil { panic(err) } fmt.Printf("Hello, %v with type %s!\n", i, reflect.TypeOf(i)) 输出: Hello, 9223372036854775807 with type

k8S-使用client-go操作集群
· ☕ 5 分钟
重要 环境说明 安装 使用 0. 校验kubeconfig可用性 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import ( "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) ## 解析kubeConfig文件, 校验 func (k *K8S)

解析k8s-yaml成client-go中的data-structs
· ☕ 1 分钟
重要 开发过程中,需要解析helm-manifest获取到的各种资源的yaml。每个都写映射 环境说明 helm 3 kubernetes-v1.15.6 安装 无 使用 注意: k8s版本不同。,资

Golang学习资料
· ☕ 1 分钟
{% note success %} 不错的备查资料 {% endnote %} 超详细备查(利于排查概念模糊点) Go语言入门教程,Golang入门教程(非常详细) 超级实用 Go语言标准库》The