Go + liteide +mac

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

Liteide is a development tool for the Google Go language developed by people in Taiwan.

1, download and install go

2, download Liteide

http://www.golangtc.com/download/liteide

3, install Liteide

Unzip the zip is a folder, do not need to install, click on it can be used, can be saved in Docker, you can copy the directory to any other directory to use.

3, environment variable control

I tested the environment variables with Mac +go+sublime before I test

sourceexport GOPATH=/Users/liuhanlin/GOexport GOBIN=$GOPATH/binexport PATH=$PATH:$GOBIN

The liteide seems to need to be re-configured in the Liteide software.

The configuration steps are:
Click View-Edit Current environment open

# native compiler drawin amd64#GOROOT=/usr/local/go#GOBIN=/Users/liuhanlin/GO/bin#GOARCH=amd64#GOOS=darwin#CGO_ENABLED=1#GOPATH=/Users/liuhanlin/GOGO15VENDOREXPERIMENT=1#PATH=$GOROOT/bin:$PATHLITEIDE_GDB=/usr/local/bin/gdbLITEIDE_MAKE=makeLITEIDE_TERM=/usr/bin/openLITEIDE_TERMARGS=-a TerminalLITEIDE_EXEC=/usr/X11R6/bin/xtermLITEIDE_EXECOPT=-e

As above is the amendment which I am doing, everybody can also according to this supplement.

4, Environmental testing

Create a directory under $gopath/src/hello use liteide Open Directory, create file Main.go

package mainimport (    "fmt")func main() {    fmt.Println("helloworld.go")}

Click on the BR button above to run the build and run
Output

/usr/local/go/bin/go build -i [/Users/liuhanlin/GO/src/helloworld]成功: 进程退出代码 0./Users/liuhanlin/GO/src/helloworld/helloworld  [/Users/liuhanlin/GO/src/helloworld]helloworld.go成功: 进程退出代码 0.

Use Note: You can enter FMT in the main function without the import Guide. Automatically prompts for Enter to import the package. Thank you for sharing with us.

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.