当前位置:网站首页>【愚公系列】2022年7月 Go教学课程 004-Go代码注释
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
2022-07-05 20:12:00 【InfoQ】
前言
1.注释的定义
2.注释的作用
一、Go代码注释
1.单行注释
//// Add 两数相加(这一行会被截取为简短介绍)
// 两数相加的注意事项以及原理(这一行作为超级详细的介绍)
func Add(n1,n2 int)int{
return n1+n2
}
2.多行注释
/**//*
regexp 包为正则表达式实现了一个简单的库。
该库接受的正则表达式语法为:
regexp:
concatenation { '|' concatenation }
concatenation:
{ closure }
closure:
term [ '*' | '+' | '?' ]
term:
'^'
'$'
'.'
character
'[' [ '^' ] character-ranges ']'
'(' regexp ')'
*/
package regexp
总结

边栏推荐
- Debezium series: PostgreSQL loads the correct last submission LSN from the offset
- nprogress插件 进度条
- Zero cloud new UI design
- Codeforces Round #804 (Div. 2) - A, B, C
- 股票开户哪里好?网上客户经理开户安全吗
- 零道云新UI设计中
- How to select the Block Editor? Impression notes verse, notation, flowus
- 秋招字节面试官问你还有什么问题?其实你已经踩雷了
- CCPC 2021威海 - G. Shinyruo and KFC(组合数,小技巧)
- Some problems encountered in cocos2d-x project summary
猜你喜欢

Go language | 01 wsl+vscode environment construction pit avoidance Guide

js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)

14. Users, groups, and permissions (14)

Leetcode: binary tree 15 (find the value in the lower left corner of the tree)

Leetcode(695)——岛屿的最大面积

【数字IC验证快速入门】2、通过一个SoC项目实例,了解SoC的架构,初探数字系统设计流程

.Net分布式事务及落地解决方案
![Scala basics [HelloWorld code parsing, variables and identifiers]](/img/75/1d89581b9b8299ffb55d95514e6df4.png)
Scala basics [HelloWorld code parsing, variables and identifiers]

.Net分布式事務及落地解决方案
![[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp](/img/32/738df44b6005fd84b4a9037464e61e.jpg)
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
随机推荐
【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法
Based on vs2017 and cmake GUI configuration, zxing and opencv are used in win10 x64 environment, and simple detection of data matrix code is realized
Build your own website (16)
Leetcode: binary tree 15 (find the value in the lower left corner of the tree)
信息学奥赛一本通 1340:【例3-5】扩展二叉树
Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables
2022年7月4日-2022年7月10日(ue4视频教程mysql)
微信小程序正则表达式提取链接
Unity editor extended UI control
什么是pyc文件
港股将迎“最牛十元店“,名创优品能借IPO突围?
ROS2专题【01】:win10上安装ROS2
leetcode刷题:二叉树14(左叶子之和)
Fundamentals of deep learning convolutional neural network (CNN)
国信证券在网上开户安全吗?
Autumn byte interviewer asked you any questions? In fact, you have stepped on thunder
leetcode刷题:二叉树15(找树左下角的值)
leetcode刷题:二叉树18(最大二叉树)
中金财富在网上开户安全吗?
【数字IC验证快速入门】2、通过一个SoC项目实例,了解SoC的架构,初探数字系统设计流程