Go installation and Environment configuration in Windows environment

Source: Internet
Author: User
Tags install go

Go installation and Environment configuration in Windows environment


  1. First visit http://golangtc.com/download to download the Go installer package and Liteide

    Here we choose Go1.5.1.windows-amd64.msi and Liteidex28.windows-qt4.zip.

  2. Install Go package directly double-click Go1.5.1.windows-amd64.msi to change the installation address to D:\go

    Liteide also unzip to D-Disk double-click Run leteide Select View-Edit Current environment Modify #goroot=e:\gowork Ctrl+s Save

    650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/6D/wKioL1aQuAGi8teeAAQkn-uUs6c829.jpg "title=" 1.JPG " alt= "Wkiol1aquagi8teeaaqkn-uus6c829.jpg"/>

  3. Modify the system environment variable to include in the system environment variable

    Goroot D:\GO

    Gopath E:\GOWORK

    PATH D:\go\bin;e:\gowork\bin

    650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/79/6F/wKiom1aQuOHSqV_iAAGaUKrio6A427.jpg "title=" 1.JPG " alt= "Wkiom1aquohsqv_iaagaukrio6a427.jpg"/>

  4. Install SUBLIMETEXT3 access HTTP://WWW.SUBLIMETEXT.COM/3 download installation run SUBLIMETEXT3

  5. Installing the Gosublime plugin via package control (CTRL+SHIFT+P)

    1. Access Https://packagecontrol.io/installation replication Sublimetext3

    import urllib.request,os,hashlib; h = ‘2915d1851351e5ee549c20394736b442‘ + ‘8bc59f460fa1548d1514676163dafc88‘; 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.path.join( ipp, pf), ‘wb‘ ).write(by)            650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/79/6F/wKiom1aQusLBw3HKAAQf2LAstK0176.jpg "title=" 1.JPG "alt=" Wkiom1aquslbw3hkaaqf2lastk0176.jpg "/>

    2. Return to SUBLIMETEXT3 window select View-show Console to paste the contents of the previous copy (step 1) Enter run

    3. Open Sublimetext3 Control window (ctrl+shift+p) input PICP Enter install in search go sublimetext install

  6. Go to Preferences--package Settings--gosublime--settings-user set the global working directory E:\gowork

  7. Write the first Go program, enter e:\gowork new application directory application directory to create a new hello.go

  8. Drag the hello.go into the SUBLIMETEXT3 to enter the following code
    Package Main
    Import (
    "FMT"
    )

    Func Main () {
    Fmt. Println ("Hello World")
    }



  9. Open cmd to enter E:\gowork\application\hello input go run hello.go

    650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/6F/wKiom1aQvk7x0XU_AAGsOZjd6KQ048.jpg "title=" 2.JPG " alt= "Wkiom1aqvk7x0xu_aagsozjd6kq048.jpg"/>

  10. The program ran successfully.

  11. The above is the Windows environment for Go installation and environment configuration








This article is from the "Last Night Rain Wind Sudden" blog, please be sure to keep this source http://zxx287856774.blog.51cto.com/3417296/1733253

Go installation and Environment configuration in Windows environment

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.