plugin_show_docs.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:GoFeather 作者: frou 项目源码 文件源码
def get_doc(cmd_wd, cmd_arg):
    # `go doc` (Go 1.5+) has different capabilities to `godoc`.
    cmd = [
        'go',
        'doc',
        '-c',
    ]
    if cmd_arg:
        # Most of the interesting identifiers in the pseudo-package builtin are
        # considered unexported because they start with lowercase.
        if cmd_arg == 'builtin' or cmd_arg.startswith('builtin.'):
            cmd.append('-u')
        cmd.append(cmd_arg)
    try:
        cmd_output = run_tool(cmd, wd=cmd_wd)
    except:
        sublime.status_message('FAILED: ' + ' '.join(cmd))
        return
    return cmd_output.decode('utf-8')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号