随笔分类 - go 学习之路
摘要:使用go写了一个简单的http接口 package main import ( "fmt" "net/http" "os/exec" "sync" "time" ) var ( requestCount int lastTimestamp time.Time mu sync.Mutex ) cons
阅读全文
摘要:背景:因为公司中的机器比较老。我们的云上监控规定,使用的token的方式来监控,所以无法监控我们的etcd集群,我这里提供的一个etcd数据转发功能,能让监控到etcd集群 package main import ( "crypto/tls" "crypto/x509" "fmt" "io" "ne
阅读全文
摘要:记录一下使用go写的一些脚本 package main import ( "encoding/json" "fmt" "log" "net/http" "os" "os/exec" "strconv" "strings" "sync" "time" ) var ( requestCount int
阅读全文
摘要:go 入门 hello world 仪式感还是要有的 package main func main() { println("hello world") } print系列主要用于输出,主要包含了三个方法: package main import "fmt" func main() { // 一次输
阅读全文