Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Mac OS X system setup Google Go language development environment configuration tool Sublime Text 2     - Install FFmpeg compiling from source in Mac OS X environment (Linux)

- Linux system security Comments (Linux)

- Android project and coding specifications (Programming)

- Install mono offline on CentOS (Server)

- On event processing browser compatibility notes (Programming)

- MySQL Parameter Tuning Best Practices (Database)

- using the ssh command to check the socket / Network Connections (Linux)

- Using Ruby to build a simple HTTP service and sass environment (Server)

- How to configure chroot environment in Ubuntu 14.04 (Linux)

- 10 Codes of good practice PHP (Programming)

- MySQL & NoSQL - Memcached widget (Database)

- Docker build their own private warehouses (Linux)

- Oracle Character Set Summary (Database)

- Use chattr and lsattr command to manage linux files and directory attributes (Linux)

- to compile FFmpeg In Ubuntu (Linux)

- Linux, rename the file or folder (mv command and rename command) (Linux)

- Convert MySQL date string to a NULL value exception handling (Database)

- Using 30 seconds to write a detailed analysis of garbage removal system (Linux)

- MongoDB version 3.2 WiredTiger storage engine performance tests (Database)

- Ubuntu 14.04 and derivative versions of the user install Pantheon Photos 0.1 (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.


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.
- Linux operating system security management skills notes (Linux)
- Oracle Client + PL SQL Developer enables remote access to the Oracle database (Database)
- Linux batch copy data script (Linux)
- Linux usage in echo (Linux)
- Linux process management related content (Linux)
- C ++ Fundamentals study notes (Programming)
- Connect to the Oracle Database Help class (Database)
- PostgreSQL query result area is removed and precision (Database)
- MySQL fuzzy query: LIKE and REGEXP pattern mode (Database)
- Talk about Java in the collection (Programming)
- About Samba certification process and permissions (Linux)
- GROUP BY extension (Database)
- grub boot error resolution examples (Linux)
- Use Ansible efficient delivery Docker container (Server)
- Install apr support for Tomcat on Linux (Server)
- Lambda expressions of evolution (Programming)
- Configuring LIDS build Linux kernel security intrusion detection system (Linux)
- How to find out a Unix system library files are 32-bit or 64-bit (Linux)
- Ubuntu install VMware Workstation 11 tutorials at 14.04 / 14.10 (Linux)
- CentOS 6.5 install Maven and Nexus warehouse agent (Server)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.