代码拉取完成,页面将自动刷新
Simple utility for extracting a JSON representation of the declarations in a Go source file.
go get -u github.com/ramya-rao-a/go-outline
> go-outline -f file.go
[{"label":"proc","type":"package",<...>}]
To parse and return only imports
> go-outline -f file.go -imports-only
To parse unsaved file contents, use the -modified
flag along with the -f
flag and write an archive to stdin.
File in the archive will be preferred over the one on disk.
The archive entry consists of:
type Declaration struct {
Label string `json:"label"`
Type string `json:"type"`
ReceiverType string `json:"receiverType,omitempty"`
Start token.Pos `json:"start"`
End token.Pos `json:"end"`
Children []Declaration `json:"children,omitempty"`
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。