Google Go Programming In Eclipse
2016-06-09 09:30
411 查看
http://www.tutorialsavvy.com/2013/04/google-go-programming-in-eclipse.html/
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,
<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,
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 are included in this bundle… Quick Start Handlebar Templating, Quick JavaScript Interview Questions, Quick CSS Authoring In SASS Way, Quick Desktop Application Development Using Electron, Quick Web Worker With JavaScript, Quick Build System with Gulp,
Google Go Programming In Eclipse
[align=center] [/align]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,
<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, "<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,
&lt;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" /&gt;
Now open up a browser and call the localhost for PORT 9090.
&lt;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" /&gt;
Apr 11, 2013Sandeep
&lt;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"&gt; These books are included in this bundle… Quick Start Handlebar Templating, Quick JavaScript Interview Questions, Quick CSS Authoring In SASS Way, Quick Desktop Application Development Using Electron, Quick Web Worker With JavaScript, Quick Build System with Gulp,
相关文章推荐
- 生成MyEclipse8.5注册码的Java源码 生成MyEclipse8.5注册码的java源码 MyEclipseKeyGen MyEclipse8.5注册机 MyEclipse8.5注册码生成
- java正则表达式
- Java千百问_03基础语法(015)_System.exit(0)有什么用
- java IO流学习总结
- Java线程1--源于Mars视频
- 实例讲解Java读取一般文本文件和word文档的方法
- JAVA反色计算方法的改进和修正
- Java reflect反射简单示例
- Struts2中使用POJO
- java中子类继承父类调用利用继承方法时调用this
- 浅谈java中的多线程及synchronized锁重入的含义
- eclipse创建android项目,无法正常预览布局文件
- [Java]《Java编程思想》知识点总结(坚持逐步更新)
- Java千百问_01基本概念(008)_jar是什么
- JAVA初级掌握的J2SE知识(二)和Java核心的API
- JAVA初级掌握的J2SE知识(一)
- Java千百问_08JDK详解(002)_jdk工具集都有什么
- Java异常的概念
- java单例设计模式
- 开源组件:(4)用元数据和BeanUtils写一个简单的ORM映射BaseDAO.java