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     - Configuring automatic mail GAMIT under CentOS system (Linux)

- How to configure AWStats in Ubuntu Server (Server)

- CentOS set up FTP server (Server)

- CentOS 6.5 installation and configuration Cobbler (Server)

- Linux server security settings to close unused ports (Linux)

- Make command tutorial (Linux)

- SSH without password (Linux)

- JavaScript common functions summary (Programming)

- Forbid screen change the window size when creating a new window under CentOS (Linux)

- Linux platform NTOP Installation and Configuration (Linux)

- How to disable IPv6 on Ubuntu, Linux Mint, Debian (Linux)

- MySQL 5.6.26 source install (Database)

- Linux distributed message queue RocketMQ deployment and monitoring - Dual Master (Server)

- AWR Report (Database)

- Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK (Linux)

- The REVERSE function of DB2 (Database)

- httpd-2.4 feature (Server)

- Shell scripts quickly deploy Tomcat project (Server)

- Linux argument references and command substitution (Linux)

- Intrusion prevention network server security maintenance tips (Linux)

 
         
  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.

http://golang.org/doc/code.html

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.
     
         
       
         
  More:      
 
- About ORA-02391 solution (Database)
- ORA-00911 invalid character error Solution (Database)
- Linux batch copy data script (Linux)
- Red Hat Linux mount U disk (Linux)
- MySQL appears data too long for column 'name' at row 1 to solve (Database)
- Zend Studio PHP syntax color scheme to export (Linux)
- Ubuntu 10.10 install Oracle 10g graphic tutorials (Database)
- Service Discovery: Zookeeper vs etcd vs Consul (Server)
- Proxmox VE implement KVM OpenVZ virtualization cloud computing (Server)
- Dell R710 server disk recovery database one case (record) (Server)
- Fedora 20 users install the Mate 1.8 desktop (Linux)
- MD5 and simple to use (Linux)
- IO reference Docker container (Server)
- 11 you Linux Terminal Command (Linux)
- Linux fixes fatal error: x264.h: No such file or directo (Linux)
- Detailed installation OpenCV2.3.1 under CentOS 6.5 (Linux)
- Mac OS X 10.9 compiler OCI8 module (Programming)
- Linux System Getting Started Learning: DeVeDe installed on Linux to create a video DVD (Linux)
- ActiveMQ configuration Getting Started Tutorial (Server)
- Python in yield (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.