如何提取内置函数代码,如delete() [英] How to extract go builtin function code such as delete()

查看:141
本文介绍了如何提取内置函数代码,如delete()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  func delete(m map [Type] Type1,key Type)

但这不是源代码。谁能告诉我内置函数源代码在哪里?

解决方案

builtin.go 只是一个用于文档目的的文件。它不包含任何实现。



地图实现位于 运行/ hashmap.go 。删除功能在 mapdelete 函数中实现。


I have found the builtin function in go src (/go/src/builtin/builtin.go), as following:

func delete(m map[Type]Type1, key Type)

But this is not source code. Who can tell me where is the builtin function source code?

解决方案

builtin.go is simply a file for documentation purposes. It doesn't contain any implementations.

The map implementation is in runtime/hashmap.go. The delete functionality is implemented in the mapdelete function.

这篇关于如何提取内置函数代码,如delete()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆