Golang Development Environment (notepad++, liteide two ways and martini frame use)

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

This paper introduces the development environment of two kinds of golang based on notepad++ and another based on Liteide.

1, download the Golang language pkg:http://golangtc.com/download

Click Install directly, all the way next.

2, the programmer must artifact notepad++ development Golang environment is very simple

One click: Plugin->plugin manger->show Plugin Manger, install plugin gonpp, restart notepad++.

The new file is named Hello.go Open with notepad++ and copies the following code:

Package Mainimport "FMT" Func Main () {FMT. Println ("Hello, World")}
Click: Plugin->gonpp->go run;

3, the following describes notepad++ highlighting the Golang keyword method:

Language---custom language--import file (C:\Go\misc\notepadplus\userDefineLang.xml to remove comments at the beginning of the end)

Copy C:\Go\misc\notepadplus\go.xml to C:\Program Files\notepad++\plugins\apis;ok, and you're done, just try it.

4, Next introduction based on integrated development environment Liteide

Download unzip, run directly, remember to configure the GOPATH system environment variables.

Description of the use of martini:

Package Mainimport "Github.com/go-martini/martini" Func Main () {m: = Martini. Classic () M.get ("/", func () string {return "Hello world!"}) M.run ()}
Use Martini to build a Web environment.

Create a new file to copy the above files into Main.go, and if you run directly you will find a missing dependency package.

This is the button that gets the dependency package using the Liteide get command.

Compile run, program output: [Martini] Listening on:3000

Use a browser to access:




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.