当前位置:网站首页>【愚公系列】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
总结

边栏推荐
- Flume series: interceptor filtering data
- Ffplay document [easy to understand]
- ICTCLAS word Lucene 4.9 binding
- ffplay文档[通俗易懂]
- What is PyC file
- 2020 CCPC 威海 - A. Golden Spirit(思维),D. ABC Conjecture(大数分解 / 思维)
- Build your own website (16)
- 实操演示:产研团队如何高效构建需求工作流?
- 强化学习-学习笔记4 | Actor-Critic
- Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
猜你喜欢

计算lnx的一种方式

JS implementation prohibits web page zooming (ctrl+ mouse, +, - zooming effective pro test)

leetcode刷题:二叉树17(从中序与后序遍历序列构造二叉树)

淺淺的談一下ThreadLocalInsecureRandom
![[quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)](/img/90/aad9d7900d686efca10140717a5c5c.png)
[quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
![[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design](/img/32/a156293f145417eeae8d93c539ca55.png)
[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design

Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?

无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...

走入并行的世界

Unity editor extended UI control
随机推荐
selenium 元素信息
信息学奥赛一本通 1339:【例3-4】求后序遍历 | 洛谷 P1827 [USACO3.4] 美国血统 American Heritage
【数字IC验证快速入门】7、验证岗位中必备的数字电路基础知识(含常见面试题)
ICTCLAS用的字Lucene4.9捆绑
Database logic processing function
Bzoj 3747 poi2015 kinoman segment tree
JVMRandom不可设置种子|问题追溯|源码追溯
.Net分布式事務及落地解决方案
实操演示:产研团队如何高效构建需求工作流?
1: Citation;
C - sequential structure
浅浅的谈一下ThreadLocalInsecureRandom
Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?
Fundamentals of deep learning convolutional neural network (CNN)
Leetcode skimming: binary tree 16 (path sum)
Debezium series: modify the source code to support UNIX_ timestamp() as DEFAULT value
Summer Challenge harmonyos - realize message notification function
kubernetes资源对象介绍及常用命令(五)-(ConfigMap&Secret)
BZOJ 3747 POI2015 Kinoman 段树
本季度干货导航 | 2022年Q2