Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Mac OS X system setup Google Go language development environment configuration tool Sublime Text 2     - LVM basic concepts, management (Linux)

- Root of AVL Tree- achieve balanced search trees AVL tree (Programming)

- DM9000 bare Driver Design (Programming)

- Copy U disk files to the Linux system on a virtual machine (Linux)

- Compression decompression command under Linux (Linux)

- 7 extremely dangerous Linux commands (Linux)

- Git Installation and Configuration (Network Agent settings) (Linux)

- How to use SVN to manage our source code (Server)

- Linux installed and tested the deployment of Kafka distributed cluster (Server)

- Android main thread message system (Handler Looper) (Linux)

- Ubuntu 14.04 compile, install, configure, the latest development version GoldenDict (Linux)

- Redis Linux system installation guide (Database)

- Detailed software to run UnixBench (Linux)

- How to install and configure a VNC server on CentOS 7.0 (Server)

- XtraBackup achieve non-stop use of master-slave synchronization service (Database)

- CentOS 6.4 OpenNebula installation (Linux)

- Haproxy multi-domain certificate HTTPS (Server)

- MySQL full-index scan bug (Database)

- Log4j configuration file Explanation (Linux)

- Ubuntu 15.10 under Python + Apache + CGI fully configured (Server)

  Mac OS X system setup Google Go language development environment configuration tool Sublime Text 2
  Add Date : 2017-01-08      
  Go Google's own language is a compiled language designed without loss of performance under the premise of reducing code complexity rates. Its advantage is the software to give full play to multi-core processors synchronous multiplex advantage, and solve problems of object-oriented programming.

First, install the SDK Golang

The official website http://golang.org/ directly download the installation package can be installed. Download the latest installation package pkg format, double click to run all the way to follow the prompts to complete the installation.

After installation is complete, open a terminal, enter go, detection Golang SDK is installed successfully, as shown below, the installation was successful

You can also enter go version check the version you have installed Golang

Second, the environment variable configuration (GOPATH)

GOPATH command is used to tell Golang and other related tools, where to find Go package directory on your system.

GOPATH is a list of paths similar to PATH settings:

GOPATH = / home / USER / go: / home / USER / workspace_go: ***

Path each list item are actually a work space, each work area should include the source files (src), the relevant package (pkg), executable files (bin) three directories.


After you have completed the workspace, you can start configuring the GOPATH (configuration file is ~ / .bash_profile).

export GOPATH = / Users / heinoc / go: / Users / heinoc / Documents / workspace / workspace_go

After saving, source ~ / .bash_profile it, completes the GOPATH configuration, you can look at the terminal go env effect after configuration.

(Note: I generally give GOPATH with at least two directories, you need to download the source packet (go get ****), the first open source packages by default will find a directory, will be unified under the first directory pkg folder, I local development projects are all stored in the back of GOPATH directory is to facilitate management pack, how to configure, see your personal preference)

Third, the development tool configuration (Sublime Text 2)

Sublime Text 2 Download: http: //www.sublimetext.com/2

Once downloaded can be installed directly.

Sublime Text 2 is free to use, but after a certain number of times to save will be prompted whether to buy, click Cancel to continue to use, and officially registered version does not make any difference.

1. Install Package Control

Ctrl + `to open the command line, use the following code:

import urllib2, os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path (); os.makedirs (ipp) if not os.path.exists (ipp) else None; urllib2.install_opener (urllib2.build_opener (urllib2.ProxyHandler ())); open (os.path.join (ipp, pf), 'wb') .write (urllib2.urlopen ( 'http://sublime.wbond.net/'+pf.replace ( '', '% 20')) read ());. print 'Please restart Sublime Text to finish installation'

Before installation

After the restart Sublime Text 2

This indicates that the installation was successful Package Control.

2. Install GoSublime plugin:

Command + Shift + P to open the Package Control, and then enter pcip (Package Control: Install Package Abbreviation)

Enter GoSublime in subsequent interface, carriage return, you can install the GoSbulime.

After installation is complete, you can see in the menu

Here, Sublime Text Golang development environment to build 2 complete.

Fourth, start Golang

GOPATH in your work space, create a folder under the src directory, named after the project, and then drag the folder Sublime Text 2, you can open the project in Sublime Text 2, and then create a new file in there save as "***. go" can, then you can start coding

For the preparation of good document, use the keyboard shortcut Command + B terminal open Sublime Text 2, enter go build (name) to be compiled

Tip compilation is successful, then execute shell commands, execute files just compiled ./gotest you can see the results of the program.
- Android and OpenCV2.4.4 build an image processing framework (2013 edition) (Linux)
- SSH without password Definitive Guide (Linux)
- Installation and deployment of Hadoop 2.7.1 on Ubuntu 14.04 LTS (Server)
- Spring declarative transaction management (Programming)
- LinSSID: a graphical Wi-Fi scanner under Linux (Linux)
- How to allow users to access only a specific database (MSSQL) (Database)
- Java Virtual Machine class loading mechanism and bytecode execution engine (Programming)
- Ubuntu 14.04 can be used to create a WIFI hotspot for Android (Linux)
- Eight kinds of techniques to solve hard problems Linux (Linux)
- Using iptables achieve NAT (Linux)
- ISO image to use offline upgrade Ubuntu (Linux)
- Linux awk text analysis tool (Linux)
- Installation of Theano + CUDA under Ubuntu (Linux)
- Linux deploy Tutorial (Linux)
- Linux System Tutorial: Fix ImportError: No module named wxversion error (Linux)
- Oracle row and column switch to turn columns (Database)
- Linux SSH commands (Linux)
- MySQL multi-master-slave synchronization (Database)
- How to fix fatal error: security / pam_modules.h: No such file or directory (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.