dont-interface
dont-interface copied to clipboard
strictly typed rate of some well-known Golang projects
pingcap/tidb (71638ee
):
root@IDC-172-16-6-59 /d/tidb (master) [2]# fish COMMAND
Among your codebase, there are...
31988 parameters declared in functions, 273 of them are evil! (98.78% typed)
20504 values returned from functions, 251 of them are evil! (98.78% typed)
11930 fields declared in structs, 368 of them are evil! (96.92% typed)
11131 values declared, 37 of them are evil! (99.67% typed)
472 type aliases introduced, 1 of them are evil! (99.79% typed)
Overall, 98.78% of your types are strictly typed (not interface{}).