• 2. vsCode 安装GoCode


    1)安装gocode

    打开命令提示符(以管理员身份打开),输入:

    go get -u -v github.com/nsf/gocode
    

    开始下载:

    image 

    下载完毕:

    image

    下载完成,查看D:GoWorks目录,多了一个srcgithub.com sfgocode路径,如下图:

    image

    雷同,通过命令行安装以下8个工具。

    2)安装godef
    go get -u -v github.com/rogpeppe/godef

    image
    3)安装golint
    go get -u -v github.com/golang/lint/golint

    image
    4)安装go-find-references
    go get -u -v github.com/lukehoban/go-find-references

    image
    5)安装go-outline
    go get -u -v github.com/lukehoban/go-outline

    image
    6)安装goreturns
    go get -u -v sourcegraph.com/sqs/goreturns

    image
    7)安装gorename
    go get -u -v golang.org/x/tools/cmd/gorename

    image
    8)安装gopkgs
    go get -u -v github.com/tpng/gopkgs

    image
    9)安装go-symbols
    go get -u -v github.com/newhook/go-symbols

    image

    集成安装命令,拷贝到cmd窗口就可完成安装:

    go get -u -v github.com/nsf/gocode
    go get -u -v github.com/rogpeppe/godef
    go get -u -v github.com/golang/lint/golint
    go get -u -v github.com/lukehoban/go-find-references
    go get -u -v github.com/lukehoban/go-outline
    go get -u -v sourcegraph.com/sqs/goreturns
    go get -u -v golang.org/x/tools/cmd/gorename
    go get -u -v github.com/tpng/gopkgs
    go get -u -v github.com/newhook/go-symbols

    3、使用 Hello word

    1)File-> Open Folder,现在工作目录:

    image image

    2)新建go文件

    image

    看看,智能提示出来了。

    image

  • 相关阅读:
    数据库连接JOIN
    Java面试金典
    Collections.sort详解
    Java复合优先于继承
    js算术运算符与数据类型转换
    js数组类型
    js对象类型
    CSS-API(CSS编程接口),CSSOM(css对象模型)
    从零开始--单片机十字路口交通灯控制实验
    matlab用双重循环实现费诺编码
  • 原文地址:https://www.cnblogs.com/dxqNet/p/10646939.html
Copyright © 2020-2023  润新知