当前位置:网站首页>golang中的iota
golang中的iota
2022-07-01 23:23:00 【raoxiaoya】
在golang中,可以看到iota的大量使用,但是这玩意的可读性的确不怎么好,还好用的是goland,可以显示其具体值。
比如,Mutex 包中的
const (
mutexLocked = 1 << iota // 1 << 0 equal 1
mutexWoken // 1 << 1 equal 2
mutexStarving // 1 << 2 equal 4
mutexWaiterShift = iota // 3
)
<<
为位运算,左移,A << B
意思是将 A 左移 B 位。
边栏推荐
- 2022安全员-C证考试题模拟考试题库及模拟考试
- Practical application and extension of plain framework
- [applet] realize the left and right [sliding] list through the scroll view component
- 【无标题】
- 认识--Matplotlib
- 2022 examination questions and online simulation examination for safety management personnel of hazardous chemical business units
- VIM color the catalogue
- 问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c
- PostgreSQL source code (57) why is the performance gap so large in hot update?
- [must] bm41 output the right view of the binary tree [medium +]
猜你喜欢
Postgresql源码(57)HOT更新为什么性能差距那么大?
深度学习 | 三个概念:Epoch, Batch, Iteration
Huisheng Huiying 2022 intelligent, fast and simple video editing software
Redis RDB snapshot
物联网技术应用属于什么专业分类
Development trend and future direction of neural network Internet of things
2022安全员-C证考试题模拟考试题库及模拟考试
【小程序】通过scroll-view组件实现左右【滑动】列表
Concepts of dictionary, hash table and array
Redis master-slave synchronization
随机推荐
【C#】依赖注入及Autofac
notBlank 和 notEmpty
The digital summit is popular, and city chain technology has triggered a new round of business transformation
Daily three questions 6.30
sql 优化
Microservice stability management
Three development trends of enterprise application from the perspective of the third technological revolution
Practical application and extension of plain framework
excel如何打开100万行以上的csv文件
纪念成为首个DAYUs200三方demo贡献者
深度学习 | 三个概念:Epoch, Batch, Iteration
2021 RoboCom 世界机器人开发者大赛-高职组复赛
Depth first search and breadth first search of graph traversal
Glass mosaic
认识--Matplotlib
Notes on problems - /usr/bin/perl is needed by mysql-server-5.1.73-1 glibc23.x86_ sixty-four
Win 10 mstsc connect RemoteApp
Daily three questions 6.28
Linux foundation - centos7 offline installation of MySQL
软件架构的本质