Go Programming Environment Installation (1:GO installation)

Source: Internet
Author: User
Tags gocode

  1. operating system: Ubuntu 14.04
  2. Go install:
    1. Download. Save directory:/home/xxxxx/download, file name: go1.4.2.linux-amd64.tar.gz.
    2. Extract to target directory, command TAR-ZXVF /home/xxxx (username)/download -C target directory.
    3. To configure environment variables:
      • Open/etc/profile file, command: sudo gedit/etc/profile
      • Add the following command at the end of the file:
      • Export path= $PATH:/home/xxxx/go/bin
      • Export Goroot=/home/xxxx/go
      • Export Gopath=/home/xxxx/mygo
      • Save the file, and then execute the following command after exiting: Source/etc/profile
      • To check if the installation was successful, execute the command: Go version. The ability to display the version number (similar to go version go1.4.2) indicates that the installation was successful.
      • Build three folders under the Gopath directory: bin,src,pkg
  3. Sublime Text 3 installation:
    1. Download. Save directory:/home/xxxxx/download, file name: Sublime-text_build-3083_amd64.deb.
    2. Install, execute command: sudo dpkg-i/home/xxxx/download/sublime-text_build-3083_amd64.deb
    3. Execute command: SUBL, can open sublime
    4. Install the package control plug-in for sublime text 3: Ctrl + ', open the command line and execute the following code:import urllib.request,os; pf = ‘Package Control.sublime-package‘; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), ‘wb‘).write(urllib.request.urlopen( ‘http://sublime.wbond.net/‘ + pf.replace(‘ ‘,‘%20‘)).read())
    5. Install git, execute command: apt-get install git.
    6. Install Gocode: Execute command: Go get github.com/nsf/gocode
    7. Install Margo: Execute command:go get github.com/slene/margo
    8. Install Gosublime:sublime text 3->references->package control->install package, search gosublime, select Install.
    9. Install other plugins in the same way
    10. Write the Go code and run:
  4. Resolution Sublime Text 3 cannot be entered in Chinese:
    1. sudo apt-get install build-essential
    2. sudo apt-get install Libgtk2.0-dev
  5. Not to be continued

Go Programming Environment Installation (1:GO installation)

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.