首页 > 系统服务 > 详细

Google Go Programming In Eclipse

时间:2016-06-09 09:40:37      阅读:248      评论:0      收藏:0      [点我收藏+]

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 then other languages.
  • Go language features are:-

            – High Speed Compilation             – Type and Memory safety             – Concurrency             – Efficient Garbage Collection

  • The Windows MSI Installer can be 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 are downloaded from link:-

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

  • In this Demo ,We will see a Go programming in Eclipse Environment”.
  • After Updating Go plugin in Eclipse, we can set Go Configuration in Eclipse,
 
 
 
 
 
技术分享
  • Create a new Go Project “GoLanguageDemo”  in Eclipse.
技术分享
  • A Google Go  project has these options,
技术分享
  •  The Go project structure in Eclipse,
技术分享
  •  Lets Create a Go Program Listening to PORT no “9090”.Let the file name is do_demo.go file.Now The project Will look like,                                                                                                                                                                                                                                                        
    技术分享

     

  • The  do_demo.go file,                
package main 
import ( "net/http" "fmt" )
/* Default Request Handler*/ func defaultHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "<h1>Hello This is Sandeep.Testing Go Programming Language %s!</h1>", r.URL.Path[1:]) }
func main() { http.HandleFunc("/", defaultHandler) http.ListenAndServe(":9090", nil) }
  • The Run As option for go file is,
技术分享
  •  Now open up a browser and call the localhost for PORT 9090.
技术分享
Apr 11, 2013Sandeep

Google Go Programming In Eclipse

原文:http://www.cnblogs.com/kungfupanda/p/5571985.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!