随笔分类 -  go 学习之路

摘要:使用go写了一个简单的http接口 package main import ( "fmt" "net/http" "os/exec" "sync" "time" ) var ( requestCount int lastTimestamp time.Time mu sync.Mutex ) cons 阅读全文
posted @ 2024-03-08 15:45 百因必有果 阅读(82) 评论(0) 推荐(0) 编辑
摘要:背景:因为公司中的机器比较老。我们的云上监控规定,使用的token的方式来监控,所以无法监控我们的etcd集群,我这里提供的一个etcd数据转发功能,能让监控到etcd集群 package main import ( "crypto/tls" "crypto/x509" "fmt" "io" "ne 阅读全文
posted @ 2024-03-05 13:33 百因必有果 阅读(7) 评论(0) 推荐(0) 编辑
摘要:记录一下使用go写的一些脚本 package main import ( "encoding/json" "fmt" "log" "net/http" "os" "os/exec" "strconv" "strings" "sync" "time" ) var ( requestCount int 阅读全文
posted @ 2024-03-05 13:28 百因必有果 阅读(29) 评论(0) 推荐(0) 编辑
摘要:go 入门 hello world 仪式感还是要有的 package main func main() { println("hello world") } print系列主要用于输出,主要包含了三个方法: package main import "fmt" func main() { // 一次输 阅读全文
posted @ 2023-03-26 22:01 百因必有果 阅读(34) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示