2024年07月04日
一,数值类型和派生类型1,数值类型
值类型 (int、float、bool、string、arry、strcut) 变量直接存储值,内存通常在栈中分配
引用类型 uintptr、slice、map、chan、interface 变量存储的是地址,地址的空间才存储数据值,内存在堆中分配
基础数据类型有:布尔型(bool) 整型(int) 浮点型(float) 字符串(string) 复数(complex)
引用类型有:字典(map) 切片(slice) 通
2022年04月07日
Golang中的正则表达式用法:单一: . 匹配任意一个字符,如果设置 s = true,则可以匹配换行符
[字符类] &
2022年03月21日
实现一个prometheus的exporter示例1,必须启动prometheus(prometheus以客户端的模式运行,然后自动周期去prometheus.yml中配置的exporter拉取数据),配置 prometheus.yml中exporter对应的promhttp的IP和端口,如果有改动配置文件,重启下prometheus程序;2,启动自己的exporter,访问自己的exporter端口以及prometheus的task列表,都会有状态和数据变化。3,启动grafana-6.7.6
2022年02月11日
Golang基础语法总结一,关键字 (关键字25个)break default func interface select case defer go map struct chan else gotopackage switch const fallthrough if range type continue for import return var二,数据类型,数据结构NUMBER,STRING, BOOLEAN, ARRAYS,SLICES,MAPS1,内建类型i