当前位置:网站首页>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 位。
边栏推荐
- Reproduction process and problems of analog transformer (ICLR 2022 Spotlight)
- 力扣今日题-241. 为运算表达式设计优先级
- Zhao Fuquan: to ensure supply in the short term, we should build a safe, efficient and resilient supply chain in the long term
- Matplotlib常用設置
- 哈工大《信息内容安全》课程知识要点和难点
- 问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c
- [swoole Series 1] what will you learn in the world of swoole?
- [understanding of opportunity-35]: Guiguzi - flying clamp - the art of remote connection, remote control and remote testing
- Notblank and notempty
- Redis master-slave synchronization
猜你喜欢

Aaai22 | structural tagging and interaction modeling: a "slim" network for graph classification

从第三次技术革命看企业应用三大开发趋势

纪念成为首个DAYUs200三方demo贡献者

notBlank 和 notEmpty

mysql binlog的清理

2022 R1 fast opening pressure vessel operation test questions and answers

2021 RoboCom 世界机器人开发者大赛-本科组初赛

STM32F030F4驱动TIM1637数码管芯片

Notes to problems - file /usr/share/mysql/charsets/readme from install of mysql-server-5.1.73-1 glibc23.x86_ 64 c

Redis RDB快照
随机推荐
What is the difference between memory leak and memory overflow?
Three development trends of enterprise application from the perspective of the third technological revolution
TS初次使用、ts类型
为什么PHP叫超文本预处理器
Win 10 mstsc connect RemoteApp
Zhongang Mining: it has inherent advantages to develop the characteristic chemical industry dominated by fluorine chemical industry
[leetcode] length of the last word [58]
字典、哈希表、数组的概念
图的遍历之深度优先搜索和广度优先搜索
What category does the Internet of things application technology major belong to
上海炒股开户选择手机办理安全吗?
物联网现状及未来发展趋势
How to display real-time 2D map after rviz is opened
flutter Unable to load asset: assets/images/888. png
excel如何打开100万行以上的csv文件
Concepts of dictionary, hash table and array
Is there a piece of code that makes you convinced by human wisdom
Create Ca and issue certificate through go language
URL introduction
Postgresql源码(57)HOT更新为什么性能差距那么大?