Go Environment Building

Source: Internet
Author: User
Tags gocode
This is a creation in Article, where the information may have evolved or changed. 1, through the Thunderbolt download go1.5 Windows installation package (Thunderbolt can be accelerated, directly downloaded by the wall) Https://golang.org/doc/install?download=go1.5.windows-amd64.msi
2. Install Gocode to prompt go get-u github.com/nsf/gocode download from GitHub gocodego build Github.com/nsf/gocode compile build gocode exe build Git is required to generate Gocode.exe files under Gopath, you may encounter a variety of pits
3, Goeclipse, direct installation of http://goclipse.github.io/releases/
Git error when installing Gocode Goeclipse >> running:go get-u github.com/nsf/gocode # CD.; git clone https://github.com/nsf/gocode C:\Go\bin\src\github.com\nsf\gocode cloning into ' C:\Go\bin\src\github.com\nsf\gocode ' ... warning:templates not found/share/git-core/templates fatal:unable to find remote helper for ' https ' Package github.com/nsf/gocode:exit Status ^^ ^ Terminated, exit code:1 ^^ ^Path add git libexec\git-core directory can be executed, solve the problem is fatal:unable to find remote helper for ' https ' This method only solves the problem with the command-line git. Eclipse or a problemPath is wrong and can solve the problem.
4, Sublime TEXT3 environment configuration installation Package-control Way HTTPS://PACKAGECONTROL.IO/INSTALLATION#ST3 import urllib.request,os,hashlib; h = ' eb2297e1a458f27d836c04bb0cbaf282 ' + ' d0e7a3098092775ccb37ca9d6b2e4b7d '; pf = ' Package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by = Urllib.request.urlopen (' http://packagecontrol.io/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h)) if DH! = H Else Open (Os.pat H.join (IPP, PF), ' WB '). Write (by)ctrl+~ Open the console, copy and paste the above script installation Package-control reboot after installation, ctrl+shift+p open Package-control Input Install Select Install package input Gosublime , select Install, reboot ctrl+b can open command Line window can enter go run xxx.go run or go build xxx.go compile to exe
5, Liteide Set the environment, pay attention to switch the current environment to Win64-user, or encounter similar problems such as the following

C:/go/bin/go.exe build-i [D:/PROGRAMMER/WORKS/GO/HELLO1/SRC]

Go:cannot find Goroot Directory:c:\go;

Error: Process exit code 2.
6, Goeclipse
The above error, should be in the SRC directory to create a go file package specified the name of the folder, the go file into the corresponding directory!!!
In addition, the project settings should be encoded into UTF-8, otherwise garbled
7, debugging Goeclipse debugging need to use Gdbliteide with Gocode and gdb so you can goeclipse the path of the GDB carton liteide with the GDB path, the same about the hint can also not compile their own, Direct point to Liteide's gocode. Again, liteide developers are very good, at present go is not very perfect tool or tool chain, Liteide has done very well, although sometimes easy to collapse.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.