博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Google Go Programming In Eclipse
阅读量:6716 次
发布时间:2019-06-25

本文共 2673 字,大约阅读时间需要 8 分钟。

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:-

           

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

          

  • 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,
 
 
 
 
 
<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 to PORT no “9090”.Let the file name is do_demo.go file.Now The project Will look like,                                                                                                                                                                                                                                                        
    <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,                
package main import (     "net/http"     "fmt" ) /* Default Request Handler*/ func defaultHandler(w http.ResponseWriter, r *http.Request) {     fmt.Fprintf(w, "

Hello This is Sandeep.Testing Go Programming Language %s!

", r.URL.Path[1:]) } 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, 2013
Sandeep
<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">

转载地址:http://vekmo.baihongyu.com/

你可能感兴趣的文章
菜鸟学Linux 第106篇笔记 cobbler
查看>>
eclipse正常启动tomcat, 访问http://localhost:8080 却报404错误
查看>>
asp.net底层公共方法
查看>>
FlexPaper和swftools合力打造文库系统
查看>>
学习笔记-Redis设计与实现-压缩列表
查看>>
dockerfile实例--openresety
查看>>
Exadata混合列压缩如何处理INSERT和UPDATE
查看>>
Setup Oracle Direct NFS Client
查看>>
CodeIgniter典型的表单提交验证代码
查看>>
宅男程序员给老婆的计算机课程之4:SQL vs NoSQL
查看>>
VIM编辑模式与命令模式
查看>>
python小技巧-基于python本身
查看>>
【C#】使用ADO .Net Entities Framework 与WPF ListBox控件绑定
查看>>
CentOS5.x系统 配置YUM服务器
查看>>
OTS数据迁移验证方案
查看>>
黑客学习笔记教程之一:黑客文化
查看>>
alias别名、时间、screen、echo等——Linux基本命令(3)
查看>>
Access-Control-Allow-Origin与跨域
查看>>
Python正则表达式详解
查看>>
交换机、路由器设备选型总结
查看>>