Google Go Programming in Eclipse

Source: Internet
Author: User
Tags vcard

http://www.tutorialsavvy.com/2013/04/google-go-programming-in-eclipse.html/

Google Go Programming in Eclipse
    • The new "Go" programming language is from Google Co. It has many features better and other languages.
    • Go language features are:-

–high speed Compilation–type and Memory safety–concurrency–efficient garbage Co Llection

    • The Windows MSI Installer can downloaded from the link:-

Http://code.google.com/p/go/downloads/list?q=OpSys-Windows+Type%3DInstaller

    • The Eclipse Plugin Update for Go programming Languages is downloaded from link:-

http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/

    • In this Demo , "We'll see a Go programming in Eclipse Environment".
    • After Updating go plugin in eclipse, we can set the Go Configuration in Eclipse,
<img border= "0" src= "http://i0.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/ go-setting-eclipse.jpg?w=667 "data-recalc-dims=" 1 "/>
    • Create a new Go Project "Golanguagedemo" in Eclipse.
<img border= "0" src= "http://i0.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/ go-project-eclipse.jpg?w=667 "data-recalc-dims=" 1 "/>
    • A Google Go Project has these options,
<img border= "0" src= "http://i1.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/do_ demo_web_server.jpg?w=667 "data-recalc-dims=" 1 "/>
    • The GO project structure in Eclipse,
<img border= "0" src= "http://i1.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/ go-project-structure-eclipse.jpg?w=667 "data-recalc-dims=" 1 "/>
  • Lets Create a Go program Listening toPORTNo"9090". Let the file name isDo_demo.go File. Now the project would look like,                                            ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp               <img border= "0" src= "http://i0.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/ go-prject-main-struct.jpg?w=667 "data-recalc-dims=" 1 "/>

  • The do_demo.go file,

Import ( "Net/http" "FMT")
/* Default Request handler*/func defaulthandler (w http. Responsewriter, R *http. Request) { fmt. fprintf (W, "Func Main () { http. Handlefunc ("/", DefaultHandler) http. Listenandserve (": 9090", nil)}
    • The Run as option for Go file is,
<img border= "0" src= "http://i2.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/ go-run-as-option.jpg?w=667 "data-recalc-dims=" 1 "/>
    • Now open up a browser and call the localhost for PORT 9090.
<img border= "0" src= "http://i0.wp.com/www.tutorialsavvy.com/wp-content/uploads/2013/04/ go-output.jpg?w=667 "data-recalc-dims=" 1 "/> APR 11, 2013Sandeep <img src= "http://i2.wp.com/www.tutorialsavvy.com/wp-content/uploads/2016/04/ quickbookshighres-e1459968126629.jpg?w=667 "alt=" Javascript Books "data-recalc-dims=" 1 "> These books is included in the This bundle ... Quick Start handlebar Templating, quick JavaScript interview Questions, Quick CSS Authoring in SASS, quick Desktop App Lication Development Using Electron, quick Web Worker with JavaScript, quick Build System with Gulp,

Google Go Programming in Eclipse

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.