当前位置:网站首页>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 位。
边栏推荐
- Concepts of dictionary, hash table and array
- What are the common types of points mall games?
- Matplotlib常用设置
- What category does the Internet of things application technology major belong to
- Current situation and future development trend of Internet of things
- Redis 主从同步
- Applet form verification encapsulation
- plain framework的实际应用和扩展
- ARP报文头部格式和请求流程
- 转行软件测试,知道这四点就够了!
猜你喜欢
云信小课堂 | IM及音视频中常见的认知误区
The digital summit is popular, and city chain technology has triggered a new round of business transformation
Matplotlib common settings
The best smart home open source system in 2022: introduction to Alexa, home assistant and homekit ecosystem
How to display real-time 2D map after rviz is opened
认识--Matplotlib
ARP message header format and request flow
Airserver latest win64 bit personal screen projection software
ConcurrentSkipListMap——跳表原理
Postgresql源码(57)HOT更新为什么性能差距那么大?
随机推荐
Glass mosaic
云信小课堂 | IM及音视频中常见的认知误区
Aaai22 | structural tagging and interaction modeling: a "slim" network for graph classification
问题随记 —— /usr/bin/perl is needed by MySQL-server-5.1.73-1.glibc23.x86_64
excel如何打开100万行以上的csv文件
Daily three questions 6.29
Yunxin small class | common cognitive misunderstandings in IM and audio and video
STM32F030F4驱动TIM1637数码管芯片
转行软件测试,知道这四点就够了!
Create Ca and issue certificate through go language
【无标题】
Redis 主从同步
from pip._ internal. cli. main import main ModuleNotFoundError: No module named ‘pip‘
【.Net Core】程序相关各种全局文件
认识--Matplotlib
from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
上海炒股开户选择手机办理安全吗?
Postgresql源码(57)HOT更新为什么性能差距那么大?
Li Kou today's question -241 Design priorities for operational expressions
Depth first search and breadth first search of graph traversal