摘要: func decorator(f func(s1 string))func(s2 string) { return func(s3 string) { fmt.Println("start") f(s3) fmt.Println("end") } } func hello(s string){ fm 阅读全文
posted @ 2022-02-24 20:08 故意写bug 阅读(114) 评论(0) 推荐(0)
摘要: //产生数据 func makeData(min,max int)[]int{ data := make([]int,max-min+1) for i := range data{ data[i]=min+i } return data } //把输入的数据通过通道传递出去 func echo(nu 阅读全文
posted @ 2022-02-24 19:59 故意写bug 阅读(159) 评论(0) 推荐(0)
摘要: ##visitor模式 //先定义一个需要访问的数据结构 type Info struct { Namespace string Name string OtherThings string } type VisitorFunc func(*Info,error)error //将访问数据的方法抽象 阅读全文
posted @ 2022-02-24 19:51 故意写bug 阅读(91) 评论(0) 推荐(0)
摘要: select的基本用法: 选择全部的字段和标签,使用默认的数据库和rp:select * from "h2o_feet" 选择特定的字段和标签,使用默认的数据库和rp:select "level description","location","water_level" from "h2o_feet 阅读全文
posted @ 2022-02-16 20:37 故意写bug 阅读(362) 评论(0) 推荐(0)
摘要: database:类似于关系数据库的数据库的概念,是用户,保留策略,持续查询,时序数据的容器 retention policy: 数据的保留策略,是一个database和measurement中间的东西 measurement: 类似于表, field key: 列名, field set: 列值的 阅读全文
posted @ 2022-02-13 20:25 故意写bug 阅读(91) 评论(0) 推荐(0)
摘要: 安装:docker pull influxdb:1.8.10 使用: 进入容器,influx -precison rfc3339 建库:create database mydb 查询全部库: show databases 指定要使用的库: use mydb 插入:insert cpu,host=se 阅读全文
posted @ 2022-02-10 21:05 故意写bug 阅读(198) 评论(0) 推荐(0)