zoukankan      html  css  js  c++  java
  • Google Go Programming In Eclipse

    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
  • 相关阅读:
    Docker 笔记
    Win10 Docker 安装使用
    golang struct转map
    Golang 中错误与异常需要重新认识
    Golang 中三种读取文件发放性能对比
    GoLang中如何使用多参数属性传参
    GoLang中flag标签使用
    Windows本地搭建Edusoho环境
    edusoho上传视频弹出abort之解决方案
    XAMPP启动mysql遇到的问题
  • 原文地址:https://www.cnblogs.com/kungfupanda/p/5571985.html
Copyright © 2011-2022 走看看