上一页 1 ··· 7 8 9 10 11
  2022年5月7日
摘要: Go 断言 golang的语言中提供了断言的功能。golang中的所有程序都实现了interface{}的接口,这意味着,所有的类型如string,int,int64甚至是自定义的struct类型都就此拥有了interface{}的接口。那么在一个数据通过func funcName(interfac 阅读全文
posted @ 2022-05-07 16:06 每天进步一点点点点点 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 安装 #ubuntu apt-get install keepalived #centos yum install keepalived master 节点配置,以nginx为例 cat > /etc/keepalived/keepalived.conf <<EOF # master node vr 阅读全文
posted @ 2022-05-07 11:37 每天进步一点点点点点 阅读(136) 评论(0) 推荐(0) 编辑
  2022年5月6日
摘要: 1、安装依赖包 go get github.com/robfig/cron 2、多个定时任务 type TestJob1 struct { } func (this TestJob1) Run() { fmt.Println("this is job1!!!!!") } type TestJob2 阅读全文
posted @ 2022-05-06 16:09 每天进步一点点点点点 阅读(227) 评论(0) 推荐(0) 编辑
  2022年5月5日
摘要: 正常map的使用 var map1 = make(map[string]interface{})map1["Name"] = "lisi"fmt.Println(map1) 链式调用方式 type TestMap map[string]interface{} func NewTestMap() Te 阅读全文
posted @ 2022-05-05 10:23 每天进步一点点点点点 阅读(194) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11