Go 语言作为开源项目,我们可以很轻松地获取它的源代码,作为一门编程语言,它有着非常复杂的项目结构和庞大的代码库,今天的 Go 语言项目中差不多有 150 万行源代码,其中包含将近 140 万行的 Go 语言,我们可以使用如下所示的命令查看 Go 语言的代码行数:
$ cloc src
5988 text files.
5875 unique files.
1165 files ignored.
github.com/AlDanial/cloc v 1.78 T=6.96 s (693.7 files/s, 274805.2 lines/s)
-----------------------------------------------------------------------------------
Language files blank comment code
-----------------------------------------------------------------------------------
Go 4199 139910 221375 1398357
Assembly 486 12784 19137