zoukankan      html  css  js  c++  java
  • The "Go" Learning Trip -- 0. Base build

    # Environmental installation

    # Official address :(over the wall may be required)

    https://golang.org/dl/

    # IDE Tools: (Visual Studio Code)

    https://code.visualstudio.com/?wt.mc_id=vscom_downloads

    # envionment variables

    Once the installation is complete, it needs to be set in the system environment variables

    "GOPATH" is Project Directory

    "GOROOT" is The "Go" Install Directory

    PATH needs set up the installation directory in bin directory

    # Open CMD shell , Input "go env" check it 

    扩展了解:

    对于Visual Studio Code开发工具,有一款优秀的GoLang插件,它的主页为:https://github.com/microsoft/vscode-go

    这款插件的特性包括:

    Colorization 代码着彩色

    Completion Lists 代码自动完成(使用gocode)

    Snippets  代码片段

    Quick Info 快速提示信息(使用godef)

    Goto Definition 跳转到定义(使用godef)

    Find References  搜索参考引用(使用go-find-references)

    File outline 文件大纲(使用go-outline)

    Workspace symbol search 工作区符号搜索(使用 go-symbols)

    Rename 重命名(使用gorename)

    Build-on-save 保存构建(使用go build和go test)

    Format 代码格式化(使用goreturns或goimports或gofmt)

    Add Imports  添加引用(使用 gopkgs)

    Debugging 调试代码(使用delve)

    # 按下F5,提示不能调试,要安装调试工具。

    go get -v -u github.com/peterh/liner   

    go get -v -u github.com/derekparker/delve/cmd/dlv

    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

  • 相关阅读:
    kvm 存储
    centos 磁盘扩容,新建lv
    openStack windows2008 centos6.* img
    openStack icehouse for centos6.4 production Env 实战
    openStack error infos 调试
    iptables 规则预设置为新centos系统
    ubuntu openStack icehouse dashboard theme自定义
    linux c in common use function reference manual
    openStack centos6.4
    ubuntu 常用生产环境部署配置测试调优
  • 原文地址:https://www.cnblogs.com/Cong0ks/p/11504769.html
Copyright © 2011-2022 走看看