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     - Linux Command Tutorial: cat command to view the contents of the file (Linux)

- Oracle how to maintain the consistency of read? (Database)

- Oracle SQL statement tracking (Database)

- Analysis of Java reflection mechanism (Programming)

- What have we learn from the front-end application Nodejs (Programming)

- fcntl file locking function add (Programming)

- Nginx is used to build the cache module srcache_nginx (Server)

- jQuery update the content and method of use 3.0 (Programming)

- Nine tips to protect the security of Linux desktop (Linux)

- Oracle 11g manually create a database (Database)

- C ++ Supplements --new delete overload (Programming)

- RAID disk array Description (Linux)

- Du and df show disk space usage inconsistent Causes and Treatment (Linux)

- Oracle database, some basic grammatical structures (Database)

- Linux installation and error under codeblocks exclude [Ubuntu 10.04] (Linux)

- Solve the compatibility problem between Linux and Java at the source in bold font (Linux)

- Windows 8.1 and Ubuntu 14.04 dual system uninstall Ubuntu Tutorial (Linux)

- VMware virtual machine to use bridged mode fast Internet access (Linux)

- How to use scientific data Docker quickly configure the development environment (Server)

- Object-C in the preparation of multi-parameter function parameter is omitted (Programming)

 
         
  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:      
 
- Use Tails 1.4 Linux system to protect the privacy and anonymity (Linux)
- Based on a complete solution RMI service to transfer large files (Programming)
- Ubuntu Gitolite management Git Server code base permissions (Server)
- 64-bit Oracle Linux recompiled Hadoop-2.2.0 (Server)
- OpenSUSE GPG Comments (Linux)
- C # Future: Tracking null reference (Programming)
- Summary of Docker mounted directory (Server)
- Oracle to create an external table (Database)
- PostgreSQL-- run Supervisord on Docker in Ubuntu (Database)
- Oracle through the alarm log view and inspect the main library, physical and snapshot standby database (Database)
- Ubuntu Locale configuration problem solving Can not set LC_CTYPE (Linux)
- Linux group account deletion, and other related operations (Linux)
- To use slay kill user processes (Linux)
- How to avoid two Chrome icon appears in ELementary OS Freya (Linux)
- MySQL DATE_FORMAT () function (Database)
- How to use the ftp tool to transfer files between Windows and Linux (Linux)
- Close common port to protect server security (Linux)
- Linux Command Line Art (Linux)
- Oracle Data Guard LOG_ARCHIVE_DEST_n optional attribute parameters (Database)
- Simple comparison of MySQL and Oracle in a sql analytical details (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.